Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
wendelin.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Kirill Smelkov
wendelin.core
Commits
74e02634
Commit
74e02634
authored
May 16, 2021
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
f68398c9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
31 deletions
+31
-31
wcfs/treediff.go
wcfs/treediff.go
+31
-0
wcfs/δbtail.go
wcfs/δbtail.go
+0
-31
No files found.
wcfs/treediff.go
View file @
74e02634
...
...
@@ -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.
...
...
wcfs/δbtail.go
View file @
74e02634
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment