Commit ac195099 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 3f3e0d87
......@@ -57,7 +57,9 @@ type setOid = set.Oid
// be present. In particular a block that was not explicitly requested to be
// tracked, even if it was changed in δZ, is not guaranteed to be present in δF.
//
// XXX after epoch previous track requests has no effects
// After file epoch (file creation, deletion, or any other change to file
// object) previous track requests for that file become forgotten and has no
// further effect.
//
// ΔFtail provides the following operations:
//
......@@ -97,13 +99,13 @@ type _ΔFileTail struct {
vδE []_ΔFileEpoch // changes to ZBigFile object itself ; nil if not yet rebuilt
}
// _ΔFileEpoch represent change to ZBigFile object.
// _ΔFileEpoch represent a change to ZBigFile object.
type _ΔFileEpoch struct {
Rev zodb.Tid
oldRoot zodb.Oid // .blktab was pointing to oldRoot before ; VDEL if ZBigFile deleted
newRoot zodb.Oid // .blktab was changed to point to newRoot ; ----//----
newBlkSize int64 // .blksize was changed to newBlkSize ; -1 if ZBigFile deleted
// XXX +oldBlkSize ?
oldBlkSize int64 // .blksize was oldBlkSize ; -1 if ZBigFile deleted
newBlkSize int64 // .blksize was changed to newBlkSize ; ----//----
// snapshot of trackSetZBlk for this file right before this epoch
oldTrackSetZBlk map[zodb.Oid]setI64 // {} zblk -> {}blk
......@@ -299,6 +301,7 @@ func (δftail *_ΔFileTail) rebuild1(foid zodb.Oid, δZtail *zodb.ΔTail, db *zo
Rev: δZ.Rev,
oldRoot: δ.blktabOld,
newRoot: δ.blktabNew,
oldBlkSize: δ.blksizeOld,
newBlkSize: δ.blksizeNew,
oldTrackSetZBlk: nil, // nothing was tracked
}
......@@ -364,6 +367,7 @@ func (δFtail *ΔFtail) Update(δZ *zodb.EventCommit) (_ ΔF, err error) {
Rev: δZ.Tid,
oldRoot: δ.blktabOld,
newRoot: δ.blktabNew,
oldBlkSize: δ.blksizeOld,
newBlkSize: δ.blksizeNew,
oldTrackSetZBlk: map[zodb.Oid]setI64{},
}
......
......@@ -245,6 +245,7 @@ func testΔFtail(t_ *testing.T, testq chan ΔFTestEntry) {
Rev: t1.At,
oldRoot: zodb.InvalidOid,
newRoot: t.Root(),
oldBlkSize: -1,
newBlkSize: blksize,
oldTrackSetZBlk: nil,
})
......@@ -414,13 +415,13 @@ func testΔFtail(t_ *testing.T, testq chan ΔFTestEntry) {
if delfile {
δE.oldRoot = t.Root()
δE.newRoot = zodb.InvalidOid
δE.oldBlkSize = blksize
δE.newBlkSize = -1
// XXX oldBlkSize ?
} else {
δE.oldRoot = zodb.InvalidOid
δE.newRoot = t.Root()
δE.oldBlkSize = -1
δE.newBlkSize = blksize
// XXX oldBlkSize ?
}
oldTrackSetZBlk := map[zodb.Oid]setI64{}
for zblk, inblk := range ZinblkPrev {
......
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