Commit 74e02634 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent f68398c9
......@@ -19,6 +19,8 @@
package main
// diff for BTree
// XXX move -> btree? (needs generics)
// XXX doc
// FIXME the algorythm is different: recursion is implemented by expanding rangeSplit step by step.
//
......@@ -69,16 +71,45 @@ package main
// . -k(blk) -> invalidate #blk
// . +k(blk) -> invalidate #blk (e.g. if blk was previously read as hole)
//go:generate ./gen-set main Oid Oid zset_oid.go
import (
"context"
"math"
"fmt"
"reflect"
"sort"
"lab.nexedi.com/kirr/go123/xerr"
"lab.nexedi.com/kirr/neo/go/zodb"
"lab.nexedi.com/kirr/neo/go/zodb/btree"
)
type Tree = btree.LOBTree
type Bucket = btree.LOBucket
type Node = btree.LONode
type TreeEntry = btree.LOEntry
type BucketEntry = btree.LOBucketEntry
type Key = int64
const KeyMax Key = math.MaxInt64
const KeyMin Key = math.MinInt64
// value is assumed to be persistent reference.
// deletion is represented as VDEL.
type Value = zodb.Oid
const VDEL = zodb.InvalidOid
// ΔValue represents change in value.
type ΔValue struct {
Old Value
New Value
}
type Oid = zodb.Oid
type SetKey = SetI64
// treeSetKey represents ordered set of keys.
// it can be point-queried and range-accessed.
......
......@@ -22,47 +22,16 @@ package main
// TODO move -> btree when ΔTail matures.
// XXX doc
//go:generate ./gen-set main Oid Oid zset_oid.go
import (
"context"
"math"
"sort"
"strings"
"lab.nexedi.com/kirr/go123/xerr"
"lab.nexedi.com/kirr/neo/go/transaction"
"lab.nexedi.com/kirr/neo/go/zodb"
"lab.nexedi.com/kirr/neo/go/zodb/btree"
)
type Tree = btree.LOBTree
type Bucket = btree.LOBucket
type Node = btree.LONode
type TreeEntry = btree.LOEntry
type BucketEntry = btree.LOBucketEntry
type Key = int64
const KeyMax Key = math.MaxInt64
const KeyMin Key = math.MinInt64
// value is assumed to be persistent reference.
// deletion is represented as VDEL.
type Value = zodb.Oid
const VDEL = zodb.InvalidOid
type Oid = zodb.Oid
type SetKey = SetI64
// ΔValue represents change in value.
type ΔValue struct {
Old Value
New Value
}
// ΔBtail represents tail of revisional changes to BTrees.
//
// It semantically consists of
......
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