Commit 4d5eb301 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent d8d59b78
......@@ -1436,13 +1436,20 @@ func (wlink *WatchLink) setupWatch(ctx context.Context, foid zodb.Oid, at zodb.T
// register w to f here early, so that READs going in parallel to us
// preparing and processing initial pins, also send pins for read
// blocks. If we don't, we can miss to send pin for a freshly read
// block which could have revision > w.at . XXX test
// block which could have revision > w.at: XXX test
//
// 1 3 2 4
// -----.----x---o----x---x-----------------
// ↑
// w.at
// -----.----x---o----x---x------.----------
// ↑
// w.at head
//
// Here blocks #1, #2 and #4 were previously accessed, are thus tracked
// by δFtail and are changed after w.at - they will be returned by vvv
// δFtail query and pin-sent to w. Block #3 was not yet accessed but
// was also changed after w.at . As head/file[#3] might be accessed
// simultaneously to watch setup, and f.readBlk will be checking
// f.watches; if w ∉ f.watches at that moment, w will miss to receive
// pin for #3.
//
// XXX locking
// XXX register only if watch was created anew, not updated?
......
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