Commit 7fbd0360 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent e2b4ee4b
......@@ -19,6 +19,9 @@
package zdata
// XXX note about ΔFtail organization: queries results are built on the fly to
// avoid complexity of recomputing vδF on tracking set change.
import (
"context"
"fmt"
......@@ -78,8 +81,8 @@ type setOid = set.Oid
type ΔFtail struct {
// ΔFtail merges ΔBtail with history of ZBlk
δBtail *xbtree.ΔBtail
fileIdx map[zodb.Oid]setOid // tree-root -> {} ZBigFile<oid> as of @head
rootIdx map[zodb.Oid]zodb.Oid // file -> tree-root
fileIdx map[zodb.Oid]setOid // tree-root -> {} ZBigFile<oid> as of @head
rootIdx map[zodb.Oid]zodb.Oid // file -> tree-root as of @head
trackSetZFile setOid // set of tracked ZBigFiles as of @head
trackSetZBlk map[zodb.Oid]*zblkTrack // zblk -> {} root -> {}blk as of @head
......@@ -104,10 +107,6 @@ type ΔFile struct {
Size bool // whether file size changed XXX -> ΔSize?
}
// XXX note about ΔFtail organization: queries results are built on the fly to
// avoid complexity of recomputing vδF on tracking set change.
// NewΔFtail creates new ΔFtail object.
//
// Initial tracked set is empty.
......@@ -334,6 +333,10 @@ func (δFtail *ΔFtail) Update(δZ *zodb.EventCommit) (_ ΔF, err error) {
_ = δ
//fmt.Printf("δZBigFile: %v\n", δ)
// XXX update .fileIdx
// XXX update .rootIdx
// XXX update .trackSetZBlk ?
}
// fmt.Printf("-> δF: %v\n", δF)
......
......@@ -222,6 +222,9 @@ func testΔFtail(t_ *testing.T, testq chan ΔFTestEntry) {
// δfstr/vδfstr converts δf/vδf to string taking xat into account
δfstr := func(δf *ΔFile) string {
s := fmt.Sprintf("@%s·%s", xat[δf.Rev], δf.Blocks)
if δf.Epoch {
s += "E"
}
if δf.Size {
s += "S"
}
......
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