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
50bc3b82
Commit
50bc3b82
authored
Jun 24, 2020
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
d5fb268f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
3 deletions
+8
-3
wcfs/δbtail.go
wcfs/δbtail.go
+6
-3
wcfs/δbtail_test.go
wcfs/δbtail_test.go
+2
-0
No files found.
wcfs/δbtail.go
View file @
50bc3b82
...
@@ -22,6 +22,8 @@ package main
...
@@ -22,6 +22,8 @@ package main
// TODO move -> btree when ΔTail matures.
// TODO move -> btree when ΔTail matures.
// XXX doc
// XXX doc
// FIXME the algorythm is different: recursion is implemented by expanding rangeSplit step by step.
//
// δ(BTree) notes
// δ(BTree) notes
// ==============
// ==============
//
//
...
@@ -78,6 +80,7 @@ import (
...
@@ -78,6 +80,7 @@ import (
"math"
"math"
"reflect"
"reflect"
"sort"
"sort"
"strings"
"lab.nexedi.com/kirr/go123/xerr"
"lab.nexedi.com/kirr/go123/xerr"
"lab.nexedi.com/kirr/neo/go/transaction"
"lab.nexedi.com/kirr/neo/go/transaction"
...
@@ -295,9 +298,9 @@ func (δBtail *ΔBtail) Track(ctx context.Context, key Key, keyPresent bool, pat
...
@@ -295,9 +298,9 @@ func (δBtail *ΔBtail) Track(ctx context.Context, key Key, keyPresent bool, pat
// XXX assert Tree Tree ... Tree Bucket
// XXX assert Tree Tree ... Tree Bucket
root
:=
treeRoot
.
POid
()
root
:=
treeRoot
.
POid
()
oidv
:=
[]
Oid
{}
pathv
:=
[]
string
{}
for
_
,
node
:=
range
path
{
oidv
=
append
(
oidv
,
node
.
POid
(
))
}
for
_
,
node
:=
range
path
{
pathv
=
append
(
pathv
,
vnode
(
node
))
}
fmt
.
Printf
(
"Track
%v %v
\n
"
,
key
,
oidv
)
fmt
.
Printf
(
"Track
[%v] %s
\n
"
,
key
,
strings
.
Join
(
pathv
,
" -> "
)
)
parent
:=
zodb
.
InvalidOid
parent
:=
zodb
.
InvalidOid
var
track
nodeTrack
var
track
nodeTrack
...
...
wcfs/δbtail_test.go
View file @
50bc3b82
...
@@ -797,6 +797,8 @@ func TestΔBTail(t *testing.T) {
...
@@ -797,6 +797,8 @@ func TestΔBTail(t *testing.T) {
// test known cases going through tree1 -> tree2 -> ...
// test known cases going through tree1 -> tree2 -> ...
testv
:=
[]
interface
{}
{
testv
:=
[]
interface
{}
{
"T2/B1:a-B7:g"
,
"T2,8/B1:a-B7:g-B9:i"
,
"T2/B1:a-B2:b"
,
"T/B1:a,2:b"
,
"T2/B1:a-B2:b"
,
"T/B1:a,2:b"
,
"T2,3/B1:a-B2:b-B3:c"
,
"T/B1:a,2:b"
,
"T2,3/B1:a-B2:b-B3:c"
,
"T/B1:a,2:b"
,
"T2,3/B1:a-B2:c-B3:c"
,
"T/B1:a,2:b"
,
"T2,3/B1:a-B2:c-B3:c"
,
"T/B1:a,2:b"
,
...
...
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