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
a6760d8f
Commit
a6760d8f
authored
Jun 23, 2020
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
953f1978
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
5 deletions
+16
-5
wcfs/δbtail.go
wcfs/δbtail.go
+16
-5
No files found.
wcfs/δbtail.go
View file @
a6760d8f
...
...
@@ -605,6 +605,10 @@ func (prs *rangeSplit) GetToBucket(ctx context.Context, k Key) (rbucket *nodeInR
}
func
(
rs
rangeSplit
)
String
()
string
{
if
len
(
rs
)
==
0
{
return
"ø"
}
s
:=
""
for
_
,
rn
:=
range
rs
{
if
s
!=
""
{
...
...
@@ -726,7 +730,7 @@ func diffT(ctx context.Context, a, b *Tree, δZTC SetOid, trackIdx map[zodb.Oid]
Adone
:=
SetKey
{}
// "processed" keys on A
Bdone
:=
SetKey
{}
// "processed" keys on B
if
b
!=
nil
{
if
b
!=
nil
{
// XXX kill (always !nil) ?
// XXX precise range as for a ^^^ ?
btop
:=
&
nodeInRange
{
lo
:
KeyMin
,
hi_
:
KeyMax
,
node
:
b
}
// [-∞, ∞)
bv
=
rangeSplit
{
btop
}
...
...
@@ -734,7 +738,7 @@ func diffT(ctx context.Context, a, b *Tree, δZTC SetOid, trackIdx map[zodb.Oid]
// initial phase: expand changed nodes in a till buckets;
// XXX changed buckets -> δ-
if
a
!=
nil
{
if
a
!=
nil
{
// XXX kill (always !nil) ?
// XXX maybe walk till a from root to get more precise initial range?
atop
:=
&
nodeInRange
{
lo
:
KeyMin
,
hi_
:
KeyMax
,
node
:
a
}
// [-∞, ∞)
av
=
rangeSplit
{
atop
}
...
...
@@ -771,13 +775,20 @@ func diffT(ctx context.Context, a, b *Tree, δZTC SetOid, trackIdx map[zodb.Oid]
return
nil
,
err
}
// XXX Adone <- δA
// XXX Bqueue <- δA
// Adone <- δA
// Bqueue <- δA
for
k
:=
range
δA
{
Adone
.
Add
(
k
)
Bqueue
.
Add
(
k
)
}
}
}
}
}
fmt
.
Printf
(
" av: %s
\n
"
,
av
)
fmt
.
Printf
(
" bv: %s
\n
"
,
bv
)
// phase 2: iterate through keys queued for A and B, delve into
// corresponding nodes, and merge diff generated from them into δ.
// Each delve for A or B, potentially adds new keys to process on the
...
...
@@ -916,7 +927,7 @@ func __diffT(ctx context.Context, a, b *Tree, δZTC SetOid, trackIdx map[zodb.Oi
bv
=
b
.
Entryv
()
// key↑
}
fmt
.
Printf
(
" av: %s
\n
"
,
vtree
(
av
))
fmt
.
Printf
(
" bv: %
v
\n
"
,
vtree
(
bv
))
fmt
.
Printf
(
" bv: %
s
\n
"
,
vtree
(
bv
))
δ
=
map
[
Key
]
ΔValue
{}
defer
fmt
.
Printf
(
" -> δt: %v
\n
"
,
δ
)
...
...
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