Commit 00bb8991 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 926408d3
......@@ -727,14 +727,20 @@ func (δFtail *ΔFtail) SliceByFileRev(zfile *ZBigFile, lo, hi zodb.Tid) /*reado
// take atomic Zinblk snapshot that covers vδZ
//
// - the reason we take snapshot is because simultaneous Track requests might
// change Zinblk concurrently, and without snapshotting this might result
// in changes to a block being not uniformly present in result (some
// revision indicates change to that block, while another one - where the
// block is too actually changed - does not indicate change to that block).
// - the reason we take atomic snapshot is because simultaneous Track
// requests might change Zinblk concurrently, and without snapshotting
// this might result in changes to a block being not uniformly present in
// the returned vδf (some revision indicates change to that block, while
// another one - where the block is too actually changed - does not
// indicate change to that block).
//
// - the reason we limit snapshot to vδZ is to reduce amount of under-lock
// copying, because original Zinblk is potentially very large.
//
// NOTE the other approach could be to keep blocks in _RootTrack.Zinblk with
// serial (!= zodb serial), and work with that _RootTrack.Zinblk snapshot by
// ignoring all blocks with serial > serial of snapshot view. Do not kill
// _ZinblkOverlay yet because we keep this approach in mind for the future.
ZinblkSnap := map[zodb.Oid]setI64{}
δZAllOid := setOid{}
for _, δZ := range vδZ {
......
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