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
106344f8
Commit
106344f8
authored
Apr 02, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
7d24eeca
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
7 deletions
+12
-7
wcfs/internal/δbtree/δbtree.go
wcfs/internal/δbtree/δbtree.go
+3
-1
wcfs/notes.txt
wcfs/notes.txt
+1
-1
wcfs/set.go.in
wcfs/set.go.in
+2
-0
wcfs/wcfs.go
wcfs/wcfs.go
+6
-5
No files found.
wcfs/internal/δbtree/δbtree.go
View file @
106344f8
...
...
@@ -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
}
...
...
wcfs/notes.txt
View file @
106344f8
...
...
@@ -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 hol
d
)
. +k(blk) -> invalidate #blk (e.g. if blk was previously read as hol
e
)
wcfs/set.go.in
View file @
106344f8
...
...
@@ -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
]
...
...
wcfs/wcfs.go
View file @
106344f8
...
...
@@ -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 prohibit
e
vely expensive.
// which is prohibit
i
vely 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
mmapp
ed (see below).
// min(rev) in δtail is min(@at) at which head/bigfile/file is currently
watch
ed (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↑)
//
...
...
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