Commit 106344f8 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 7d24eeca
......@@ -40,10 +40,12 @@ type Bucket = btree.LOBucket
//
// PathSet is not safe for concurrent access.
type PathSet struct {
// residency index: BTree|Bucket to top tree element.
// residency index: BTree|Bucket -> top tree element.
// XXX -> rootIdx ?
residencyIdx map[zodb.Oid]SetTree // oid -> {} roots
// master index: tree root -> {} masters
// XXX master -> user?
masterIdx map[*Tree]SetObject
}
......
......@@ -231,4 +231,4 @@ XXX -> internal/btreediff ?
δ(BTree) in wcfs context:
. -k(blk) -> invalidate #blk
. +k(blk) -> invalidate #blk (e.g. if blk was previously read as hold)
. +k(blk) -> invalidate #blk (e.g. if blk was previously read as hole)
......@@ -27,6 +27,8 @@ func (s Set) Add(v VALUE) {
s[v] = struct{}{}
}
// XXX + Del(v) ?
// Has checks whether the set contains v.
func (s Set) Has(v VALUE) bool {
_, ok := s[v]
......
......@@ -266,7 +266,7 @@ package main
// 4.2) ø: nothing to do - see invariant ^^^.
// 4.3) obj found:
//
// - ZBlk* -> file/#blk
// - ZBlk* -> file/#blk XXX [] of file/[]#blk
// - BTree/Bucket -> δ(BTree) -> file/[]#blk
//
// in the end after processing all []oid from invalidation message we have
......@@ -278,7 +278,7 @@ package main
// FIXME no - we can build it but not in full - since we consider only zobj in live cache.
// FIXME and even if we consider all δ'ed zobj, building complete set of
// file.δtail requires to first do complete scan of file.blktab
// which is prohibitevely expensive.
// which is prohibitively expensive.
//
// 4.4) for all file/blk to invalidate we do:
//
......@@ -287,6 +287,7 @@ package main
// cache for @<rev>/bigfile/file[blk], where
//
// # see below about file.δtail
// # XXX -> file.δtail.LastRevOf(#blk, zhead.at)
// rev = max(file.δtail.by(#blk)) || min(rev ∈ file.δtail) || zhead.at
//
// - invalidate head/bigfile/file[blk] in OS file cache.
......@@ -314,7 +315,7 @@ package main
// δtail.tail describes invalidations to file we learned from ZODB invalidation.
// δtail.by allows to quickly lookup information by #blk.
//
// min(rev) in δtail is min(@at) at which head/bigfile/file is currently mmapped (see below).
// min(rev) in δtail is min(@at) at which head/bigfile/file is currently watched (see below).
//
// XXX δtail can miss ...
//
......@@ -322,7 +323,7 @@ package main
// make sure that min(rev) is enough to cover last 10 minutes of history
// from head/at.
//
// 7) when we receive a FUSE read(#blk) request to a head/bigfile/file we process it as follows:
// 7) when we receive a FUSE read(#blk) request to a head/bigfile/file, we process it as follows:
//
// 7.1) load blkdata for head/bigfile/file[blk] @zhead.at .
//
......@@ -334,7 +335,7 @@ package main
// it is not exact because BTree/Bucket can change (e.g. rebalance)
// but still point to the same k->ZBlk.
//
// we also use file.δtail to find either exact blk revision:
// we also use file.δtail to find either exact blk revision: XXX
//
// rev(blk) = max(file.δtail.by(#blk) -> []rev↑)
//
......
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