Commit 75953935 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent ac7488d3
......@@ -488,10 +488,23 @@ type Watch struct {
type Watcher struct {
sk *FileSock
// XXX
// fileTab: BigFile ->
// at
// pinned = ... XXX
// established file watchers.
// XXX in-progress - where?
// XXX locking?
fileTab map[*FileWatch]struct{}
}
// FileWatch represents watching for 1 BigFile.
type FileWatch struct {
link *Watcher // link to client
file *BigFile // XXX needed?
// XXX locking
// requested to be watched @at
at zodb.Tid
// XXX pinned
}
// /(head|<rev>)/bigfile/ - served by BigFileDir.
......@@ -538,11 +551,10 @@ type BigFile struct {
loadMu sync.Mutex
loading map[int64]*blkLoadState // #blk -> {... blkdata}
// XXX mappings where client(s) requested isolation guarantee
//mappings ... XXX -> watchers?
// watchers attached to this file
watchers map[*Watcher]struct{}
// XXX already in "established" state (i.e. initial watch request was answered with "ok")
// XXX locking -> watchMu?
watchers map[*FileWatch]struct{}
}
// blkLoadState represents a ZBlk load state/result.
......@@ -556,7 +568,7 @@ type blkLoadState struct {
err error
}
// -------- 3) ZODB invariant --------
// -------- 3) Cache invariant --------
// zodbCacheControl implements zodb.LiveCacheControl to tune ZODB to never evict
// LOBTree/LOBucket from live cache. We want to keep LOBTree/LOBucket always alive
......
......@@ -613,6 +613,8 @@ def test_wcfs():
# XXX access to block not previously accessed but invalidated in ZODB
# XXX new watch request while previous watch request is in progress (over the same /head/watch handle)
def test_wcfs_invproto():
......
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