Commit 2d9ed1c4 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 038ef9bb
......@@ -110,6 +110,9 @@
// The client can start to use mmapped data after it gets "ok".
// The server sends "error" reply if requested <at> is too far away back from
// head/at.
// XXX other errors are possible (e.g. "no such file", or error handling pin).
// XXX error handling pin -> then client is killed?
// XXX if not - specify that watch state is lost after error.
//
// Upon watch request, either initially, or after sending "ok", the server will be notifying the
// client about file blocks that client needs to pin in order to observe file's
......@@ -1399,15 +1402,14 @@ func (wlink *WatchLink) setupWatch(ctx context.Context, foid zodb.Oid, at zodb.T
at: at,
pinned: make(map[int64]zodb.Tid),
}
}
// at=InvalidTid means "remove the watch"
// at="-" (InvalidTid) means "remove the watch"
// XXX locking
if at == zodb.InvalidTid {
delete(wlink.byfile, foid)
delete(w.file.watches, w)
return
return nil
}
......
......@@ -1338,6 +1338,7 @@ def test_wcfs():
w_assertPin( {2:at3, 3:at2, 5:at0})
# XXX advance watch - receives new pins/unpins to @head
# XXX this is already tested ^^^ in at_i -> at_j -> ...
wl3.close()
......
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