Commit 023d55c6 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent df8671c1
......@@ -477,6 +477,12 @@ class ZBigFile(LivePersistent):
LivePersistent.__init__(self)
self.__setstate__((blksize, LOBTree())) # NOTE L enough for blk_t
# TODO use custom class for .blktab with adjusted bucket size, simething like
# class xLOBTree(LOBTree):
# __slots__ = ()
# max_leaf_size = ... # BTree's default = 60
# max_internal_size = ... # BTree's default = 500
# state is (.blksize, .blktab)
def __getstate__(self):
......
......@@ -412,6 +412,11 @@ package main
// δF - change in File*s* space
// δfile - change in File(1) space
// XXX describe locking
//
// head.zconnMu write by handleδZ; read by read
// ...
import (
"bufio"
"context"
......@@ -1362,6 +1367,11 @@ func (wlink *WatchLink) setupWatch(ctx context.Context, foid zodb.Oid, at zodb.T
return fmt.Errorf("at is too far away back from head/at")
}
// XXX register w to f early, so that READs going in parallel to us
// preparing and processing initial pins, also sends pin for read
// blocks. If we don't we can miss to send pin for a freshly read which
// could have revision > w.at .
toPin := map[int64]zodb.Tid{} // blk -> @rev
// XXX locking ok?
......@@ -1393,8 +1403,6 @@ func (wlink *WatchLink) setupWatch(ctx context.Context, foid zodb.Oid, at zodb.T
panic(err) // XXX
}
// XXX register w to f (here ?)
return nil
}
......
......@@ -651,6 +651,9 @@ def test_wcfs():
# XXX ZBlk copied from blk1 -> blk2 ; for the same file and for file1 -> file2
# XXX ZBlk moved from blk1 -> blk2 ; for the same file and for file1 -> file2
# XXX read file[blk]=hole; then file[blk]=zblk - must be invalidated and
# setupWatch must send pins.
def test_wcfs_invproto():
......
......@@ -192,6 +192,10 @@ func (δFtail *ΔFtail) SliceByFileRev(file *BigFile, lo, hi zodb.Tid) /*readonl
// FIXME stub: assumes blktab topology does not change.
// takes only ZBlk history into account.
var vδfile []Δfile
for _, δZ := range vδZ {
for _, oid := range δZ.Changev {
}
}
/*
// XXX activate zfile?
......
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