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
3af1ed43
Commit
3af1ed43
authored
Jun 30, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
9ca80a2a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
11 deletions
+16
-11
wcfs/wcfs.go
wcfs/wcfs.go
+14
-11
wcfs/wcfs_test.py
wcfs/wcfs_test.py
+1
-0
wcfs/δftail.go
wcfs/δftail.go
+1
-0
No files found.
wcfs/wcfs.go
View file @
3af1ed43
...
...
@@ -295,7 +295,7 @@ package main
// cache for @<rev>/bigfile/file[blk], where
//
// # see below about file.δtail
// # XXX -> file.
δtail.LastBlkRev
(#blk, zhead.at)
// # XXX -> file.
BlkRevAt
(#blk, zhead.at)
// rev = max(file.δtail.by(#blk)) || min(rev ∈ file.δtail) || zhead.at
//
// - invalidate head/bigfile/file[blk] in OS file cache.
...
...
@@ -313,7 +313,7 @@ package main
// 5) after OS file cache was invalidated, we resync zhead to new database
// view corresponding to tid.
//
// 6) for every file δtail invalidation info about head/data is maintained:
// 6) for every file δtail invalidation info about head/data is maintained:
XXX -> δFtail
//
// - tailv: [](rev↑, []#blk)
// - by: {} #blk -> []rev↑ in tail
...
...
@@ -341,7 +341,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 δFtail
//
// rev(blk) = max(file.δtail.by(#blk) -> []rev↑)
//
...
...
@@ -415,14 +415,12 @@ package main
// δF - change in File*s* space
// δfile - change in File(1) space
// XXX
describe
locking
// XXX locking
//
// head.zheadMu
write by handleδZ; read by read
//
-> rlockZHead() + lockZHead() ?
// head.zheadMu
WLock by handleδZ
//
RLock by read
// ...
// XXX locking: test with -race (many bugs are reported)
import
(
"bufio"
"context"
...
...
@@ -507,8 +505,6 @@ type Head struct {
// uploadBlk signals to zwatcher that there are so many inflight OS cache uploads currently.
inflightOSCacheUploads
int32
// XXX move zconn's current transaction to Head here?
// head/watch opens
// XXX protected by ... zheadMu ?
wlinkTab
map
[
*
WatchLink
]
struct
{}
...
...
@@ -545,9 +541,13 @@ type BigFile struct {
zfile
*
ZBigFile
// things read/computed from .zfile; constant during lifetime of current transaction.
// XXX i.e. changed under zhead.W
blksize
int64
// zfile.blksize
size
int64
// zfile.Size()
rev
zodb
.
Tid
// last revision that modified zfile data
// XXX we can't know rev fully as some later blocks could be learnt only
// while populating δFtail lazily
// XXX or then it is not "constant during lifetime of current txn"
// // tail change history of this file.
// //
...
...
@@ -570,6 +570,7 @@ type BigFile struct {
// progress of being established. XXX text
//
// XXX locking -> watchMu?
// XXX -> watchTab ?
watches
map
[
*
Watch
]
struct
{}
}
...
...
@@ -667,6 +668,7 @@ func (_ *zodbCacheControl) PCacheClassify(obj zodb.IPersistent) zodb.PCachePolic
return
0
}
/*
// -------- zhead lock/wait --------
// XXX needed?
...
...
@@ -675,6 +677,7 @@ func (head *Head) zheadRLock() { head.zheadMu.RLock() }
func (head *Head) zheadRUnlock() { head.zheadMu.RUnlock() }
func (head *Head) zheadLock() { head.zheadMu.Lock() }
func (head *Head) zheadUnlock() { head.zheadMu.Unlock() }
*/
// -------- 4) ZODB invalidation -> OS cache --------
...
...
@@ -683,7 +686,7 @@ func traceZWatch(format string, argv ...interface{}) {
return
}
log
.
Info
f
(
"zwatcher: "
+
format
,
argv
...
)
// XXX InfoDepthf
log
.
Info
Depth
(
1
,
fmt
.
Sprintf
(
"zwatcher: "
+
format
,
argv
...
))
}
// zwatcher watches for ZODB changes.
...
...
wcfs/wcfs_test.py
View file @
3af1ed43
...
...
@@ -1785,6 +1785,7 @@ def test_wcfs_watch_2files():
# XXX new watch request while previous watch request is in progress (over the same /head/watch handle)
# XXX @revX/ is automatically removed after some time
...
...
wcfs/δftail.go
View file @
3af1ed43
...
...
@@ -425,6 +425,7 @@ func (δFtail *ΔFtail) SliceByFileRev(file *BigFile, lo, hi zodb.Tid) /*readonl
}
// XXX -> BlkRevAt
// LastBlkRev returns last revision that changed file[blk] as of @at database state.
//
// if exact=False - what is returned is only an upper bound for last block revision.
...
...
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