Commit ef23c06e authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 864af0b8
...@@ -82,7 +82,7 @@ ...@@ -82,7 +82,7 @@
// where /bigfile/<bigfileX> represent bigfile data as of revision <revX>. // where /bigfile/<bigfileX> represent bigfile data as of revision <revX>.
// //
// Unless accessed {head,@<revX>}/bigfile/<bigfileX> are not automatically visible in // Unless accessed {head,@<revX>}/bigfile/<bigfileX> are not automatically visible in
// wcfs filesystem. Similarly @<revX>/ become visible only after accessed. // wcfs filesystem. Similarly @<revX>/ become visible only after access.
// //
// //
// Invalidation protocol // Invalidation protocol
...@@ -244,18 +244,16 @@ package main ...@@ -244,18 +244,16 @@ package main
// 2) head/bigfile/* of all bigfiles represent state as of zhead.At . // 2) head/bigfile/* of all bigfiles represent state as of zhead.At .
// 3) for head/bigfile/* the following invariant is maintained: // 3) for head/bigfile/* the following invariant is maintained:
// //
// #blk ∈ OS file cache => ZBlk(#blk) + all BTree/Bucket that lead to it ∈ zhead cache // #blk ∈ OS file cache => ZBlk(#blk) + all BTree/Bucket that lead to it ∈ zhead cache(%)
// (ZBlk* in ghost state(%))
// //
// The invariant helps on invalidation: if we see a changed oid, and // The invariant helps on invalidation: if we see a changed oid, and
// zhead.cache.lookup(oid) = ø -> we know we don't have to invalidate OS // zhead.cache.lookup(oid) = ø -> we know we don't have to invalidate OS
// cache for any part of any file (even if oid relates to a file block - that // cache for any part of any file (even if oid relates to a file block - that
// block is not cached and will trigger ZODB load on file read). // block is not cached and will trigger ZODB load on file read).
// //
// Currently we maintain this invariant by simply never evicting LOBTree/LOBucket // Currently we maintain this invariant by simply never evicting ZBlk/LOBTree/LOBucket
// objects from ZODB Connection cache (LOBucket keeps references to ZBlk* and // objects from ZODB Connection cache. In the future we may want to try to
// so ZBlk* also stay in cache in ghost form). In the future we may want to // synchronize to kernel freeing its pagecache pages.
// try to synchronize to kernel freeing its pagecache pages.
// //
// 4) when we receive an invalidation message from ZODB - we process it and // 4) when we receive an invalidation message from ZODB - we process it and
// propagate invalidations to OS file cache of head/bigfile/*: // propagate invalidations to OS file cache of head/bigfile/*:
...@@ -545,11 +543,11 @@ func (cc *zodbCacheControl) WantEvict(obj zodb.IPersistent) bool { ...@@ -545,11 +543,11 @@ func (cc *zodbCacheControl) WantEvict(obj zodb.IPersistent) bool {
default: default:
return true return true
case *ZBlk0:
case *ZBlk1:
case *btree.LOBTree: case *btree.LOBTree:
case *btree.LOBucket: case *btree.LOBucket:
// ZBlk* are kept referenced by a LOBucket, so they don't go away from Connection.cache.objtab
// FIXME we need to keep ZBigFile in cache: even if we keep a pointer // FIXME we need to keep ZBigFile in cache: even if we keep a pointer
// to ZBigFile, but it is allowed to drop its state, it will release // to ZBigFile, but it is allowed to drop its state, it will release
// pointer to LOBTree object and, consequently, that LOBTree object, // pointer to LOBTree object and, consequently, that LOBTree object,
......
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