Commit 5a815a0c authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent fbc98aab
......@@ -1306,7 +1306,8 @@ func (wlink *WatchLink) setupWatch(ctx context.Context, foid zodb.Oid, at zodb.T
// XXX locking
if f.δtail.Tail() < at {
if at < f.δtail.Tail() {
// XXX err += head.at?
return fmt.Errorf("at is too far away back from head/at")
}
......@@ -1317,6 +1318,8 @@ func (wlink *WatchLink) setupWatch(ctx context.Context, foid zodb.Oid, at zodb.T
//
// FIXME (!!!) since f.δtail does not have all changes to f, here we
// can be missing some pins we should be sending. (see wcfs_test.py for details)
//
// XXX at can be > f.δtail.Head due to ^^^ (and then SliceByRev panics)
for _, δ := range f.δtail.SliceByRev(at, f.δtail.Head()) {
for _, blk := range δ.Changev {
_, already := toPin[blk]
......@@ -1423,12 +1426,11 @@ func (wlink *WatchLink) _serveRX() (err error) {
fmt.Printf("S: watch: AAA\n")
if false {
err = wlink.setupWatch(ctx, foid, at)
if err != nil {
fmt.Printf("S: watch: QQQ: %s\n", err)
return fmt.Errorf("%d: %s", stream, err)
}
}
fmt.Printf("S: watch: BBB\n")
......
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