Commit d9842e52 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 8adc4356
...@@ -294,19 +294,7 @@ func (δBtail *ΔBtail) Tail() zodb.Tid { return δBtail.δZtail.Tail() } ...@@ -294,19 +294,7 @@ func (δBtail *ΔBtail) Tail() zodb.Tid { return δBtail.δZtail.Tail() }
// XXX path -> []oid ? // XXX path -> []oid ?
// //
// XXX catch cycles on add? // XXX catch cycles on add?
/* func (δBtail *ΔBtail) Track(key Key, keyPresent bool, path []Node) error { // XXX Tree|Bucket; path[0] = root
type TrackFlags int
const (
// TrackMaxKey
// - indicates that provided path is currently the rightmost arm of the tree, and
// - requests that changes to max key of the tree to be covered by δBtail from now on.
TrackMaxKey TrackFlags = 1 << iota
// XXX TrackMinKey (we don't need it in WCFS)
)
*/
//func (δBtail *ΔBtail) Track(key Key, keyPresent bool, path []Node, flags TrackFlags) error { // XXX Tree|Bucket; path[0] = root
func (δBtail *ΔBtail) Track(key Key, keyPresent bool, path []Node) error { // XXX Tree|Bucket; path[0] = root
l := len(path) l := len(path)
if l == 0 { if l == 0 {
panic("empty path") panic("empty path")
......
...@@ -561,8 +561,6 @@ func xverifyΔBTail1(t *testing.T, subj string, db *zodb.DB, treeRoot zodb.Oid, ...@@ -561,8 +561,6 @@ func xverifyΔBTail1(t *testing.T, subj string, db *zodb.DB, treeRoot zodb.Oid,
path = append(path, node) path = append(path, node)
}); X(err) }); X(err)
// kInf imitates ZBigFile.Size() request, which enables maxkey tracking.
// XXX ^^^ comment place = ?
err = δbtail.Track(k, ok, path); X(err) err = δbtail.Track(k, ok, path); X(err)
kadjTracked.Update(kadj[k]) kadjTracked.Update(kadj[k])
...@@ -596,19 +594,14 @@ func xverifyΔBTail1(t *testing.T, subj string, db *zodb.DB, treeRoot zodb.Oid, ...@@ -596,19 +594,14 @@ func xverifyΔBTail1(t *testing.T, subj string, db *zodb.DB, treeRoot zodb.Oid,
// holes1 = tracked1 \ kv1 // holes1 = tracked1 \ kv1
holes1 := SetKey{} holes1 := SetKey{}
for k := range initialTrackedKeys { for k := range initialTrackedKeys {
if k == kInf {
continue // ∞ is translated to maxk1 XXX
}
_, keyin1 := xkv1.Get(k).kv[k] _, keyin1 := xkv1.Get(k).kv[k]
if !keyin1 { if !keyin1 {
holes1.Add(k) holes1.Add(k)
} }
} }
/*
if !reflect.DeepEqual(holes1, δbtail.holeIdx.SetKey) { if !reflect.DeepEqual(holes1, δbtail.holeIdx.SetKey) {
badf("δbtail.holeIdx1 wrong ; holeIdx=%v holeIdxOK=%v", δbtail.holeIdx, holes1) badf("δbtail.holeIdx1 wrong ; holeIdx=%v holeIdxOK=%v", δbtail.holeIdx, holes1)
} }
*/
// XXX verify δbtail holeIdx against @at1 // XXX verify δbtail holeIdx against @at1
......
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