Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
wendelin.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Kirill Smelkov
wendelin.core
Commits
ef23c06e
Commit
ef23c06e
authored
Mar 07, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
864af0b8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
9 deletions
+7
-9
wcfs/wcfs.go
wcfs/wcfs.go
+7
-9
No files found.
wcfs/wcfs.go
View file @
ef23c06e
...
@@ -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 access
ed
.
// 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,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment