Commit 943dfc75 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 004ca7c4
...@@ -1338,6 +1338,7 @@ func xidOf(obj zodb.IPersistent) string { ...@@ -1338,6 +1338,7 @@ func xidOf(obj zodb.IPersistent) string {
func (δBtail *ΔBtail) ForgetPast(revCut zodb.Tid) { func (δBtail *ΔBtail) ForgetPast(revCut zodb.Tid) {
δBtail.δZtail.ForgetPast(revCut) // XXX stub δBtail.δZtail.ForgetPast(revCut) // XXX stub
// XXX clean vδT
} }
...@@ -1394,7 +1395,7 @@ func (δBtail *ΔBtail) Get(ctx context.Context, root *Tree, key Key, at zodb.Ti ...@@ -1394,7 +1395,7 @@ func (δBtail *ΔBtail) Get(ctx context.Context, root *Tree, key Key, at zodb.Ti
// either use @tail[key], if it is present, or @head[key] // either use @tail[key], if it is present, or @head[key]
rev = δBtail.Tail() rev = δBtail.Tail()
revExact = false revExact = false
value, ok = δTtail.KVAtTail[key] value, ok = δTtail.KVAtTail[key] // XXX kill - just use δvalue.Old from next-to-at entry
if ok { if ok {
return return
} }
...@@ -1414,10 +1415,9 @@ func (δBtail *ΔBtail) Get(ctx context.Context, root *Tree, key Key, at zodb.Ti ...@@ -1414,10 +1415,9 @@ func (δBtail *ΔBtail) Get(ctx context.Context, root *Tree, key Key, at zodb.Ti
return return
} }
// XXX // XXX don't need
func (δBtail *ΔBtail) SliceByRev(lo, hi zodb.Tid) /*readonly*/ []ΔB { func (δBtail *ΔBtail) SliceByRev(lo, hi zodb.Tid) /*readonly*/ []ΔB {
δassertSlice(δBtail, lo, hi) δassertSlice(δBtail, lo, hi)
panic("TODO") panic("TODO")
} }
...@@ -1432,7 +1432,6 @@ func (δBtail *ΔBtail) SliceByRev(lo, hi zodb.Tid) /*readonly*/ []ΔB { ...@@ -1432,7 +1432,6 @@ func (δBtail *ΔBtail) SliceByRev(lo, hi zodb.Tid) /*readonly*/ []ΔB {
// Note: contrary to regular go slicing, low is exclusive while high is inclusive. // Note: contrary to regular go slicing, low is exclusive while high is inclusive.
func (δBtail *ΔBtail) SliceByRootRev(root *Tree, lo, hi zodb.Tid) /*readonly*/[]ΔTree { func (δBtail *ΔBtail) SliceByRootRev(root *Tree, lo, hi zodb.Tid) /*readonly*/[]ΔTree {
δassertSlice(δBtail, lo, hi) δassertSlice(δBtail, lo, hi)
panic("TODO") panic("TODO")
} }
......
...@@ -601,7 +601,6 @@ func xverifyΔBTail(t *testing.T, subj string, db *zodb.DB, treeRoot zodb.Oid, a ...@@ -601,7 +601,6 @@ func xverifyΔBTail(t *testing.T, subj string, db *zodb.DB, treeRoot zodb.Oid, a
// xverifyΔBTail1 verifies how ΔBTail handles ZODB update at1->at2 from initial // xverifyΔBTail1 verifies how ΔBTail handles ZODB update at1->at2 from initial
// tracked state defined by initialTrackedKeys. // tracked state defined by initialTrackedKeys.
// XXX initialTrackedKeys -> tracked1 ?
func xverifyΔBTail1(t *testing.T, subj string, db *zodb.DB, treeRoot zodb.Oid, at1,at2 zodb.Tid, xkv1,xkv2 RBucketSet, δZ *zodb.EventCommit, initialTrackedKeys SetKey, kadj map[Key]SetKey) { func xverifyΔBTail1(t *testing.T, subj string, db *zodb.DB, treeRoot zodb.Oid, at1,at2 zodb.Tid, xkv1,xkv2 RBucketSet, δZ *zodb.EventCommit, initialTrackedKeys SetKey, kadj map[Key]SetKey) {
X := exc.Raiseif X := exc.Raiseif
tracef("\n>>> Track=%s\n", initialTrackedKeys) tracef("\n>>> Track=%s\n", initialTrackedKeys)
...@@ -853,7 +852,7 @@ func testΔBTail(t *testing.T, testq chan ΔBTestEntry) { ...@@ -853,7 +852,7 @@ func testΔBTail(t *testing.T, testq chan ΔBTestEntry) {
tracef("\n\n\n**** %s ****\n\n", subj) tracef("\n\n\n**** %s ****\n\n", subj)
xverifyΔBTail(t, subj, db, tg.treeRoot, at1,at2, xkv1,xkv2, δZ, test.kadjOK) xverifyΔBTail(t, subj, db, tg.treeRoot, at1,at2, xkv1,xkv2, δZ, test.kadjOK)
// XXX also verify ΔBtail.Get + ... // XXX also verify ΔBtail.Get + SliceByRootRev
at1 = at2 at1 = at2
xkv1 = xkv2 xkv1 = xkv2
......
...@@ -343,14 +343,12 @@ func (δFtail *ΔFtail) update(file *BigFile) { ...@@ -343,14 +343,12 @@ func (δFtail *ΔFtail) update(file *BigFile) {
// ForgetPast discards all δFtail entries with rev ≤ revCut. // ForgetPast discards all δFtail entries with rev ≤ revCut.
func (δFtail *ΔFtail) ForgetPast(revCut zodb.Tid) { func (δFtail *ΔFtail) ForgetPast(revCut zodb.Tid) {
panic("TODO") δFtail.δBtail.ForgetPast(revCut)
// XXX -> .δBtail.ForgetPast(recCut)
} }
// XXX don't need // XXX don't need
func (δFtail *ΔFtail) SliceByRev(lo, hi zodb.Tid) /*readonly*/ []ΔF { func (δFtail *ΔFtail) SliceByRev(lo, hi zodb.Tid) /*readonly*/ []ΔF {
δassertSlice(δFtail, lo, hi) δassertSlice(δFtail, lo, hi)
panic("TODO") panic("TODO")
} }
...@@ -367,7 +365,7 @@ func (δFtail *ΔFtail) SliceByFileRev(file *BigFile, lo, hi zodb.Tid) /*readonl ...@@ -367,7 +365,7 @@ func (δFtail *ΔFtail) SliceByFileRev(file *BigFile, lo, hi zodb.Tid) /*readonl
δassertSlice(δFtail, lo, hi) δassertSlice(δFtail, lo, hi)
// FIXME rework to just query .δBtail.SliceByRootRev(file.blktab, lo, hi) + // FIXME rework to just query .δBtail.SliceByRootRev(file.blktab, lo, hi) +
// merge δZBlk history iwith that. // merge δZBlk history with that.
// XXX locking? // XXX locking?
δFtail.update(file) δFtail.update(file)
......
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