Commit 48eb692f authored by Kirill Smelkov's avatar Kirill Smelkov

X found another bug in wc 1 invalidation

parent 5a4562fc
......@@ -148,6 +148,16 @@ class ZBlkBase(Persistent):
# and never e.g. deleted from bigfile. However it is NOT correct: e.g
# ZBigFile.storeblk() can change type of stored zblk - i.e. it rewrites
# ZBigFile.blktab[blk] with another ZBlk created anew.
#
# FIXME this assumes that ghostified ZBlk will never be removed from live
# objects cache (cPicleCache). However, since ZBlk is not doing
# anything special, and it actually becomes a ghost all the time (e.g.
# ZBlk0.loadblkdata() ghostifies itself not to waste memory), this
# assumption is NOT correct. Thus, if a ghost ZBlk will be removed from
# live cache, corresponding block will MISS to invalidate its data.
# This practically can happen if LOBucket, that is part of
# ZBigFile.blktab and that was holding reference to this ZBlk, gets
# ghostified under live cache pressure.
def _p_invalidate(self):
# do real invalidation only once - else we already lost ._v_zfile last time
if self._p_state is GHOST:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment