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
970d3243
Commit
970d3243
authored
Jun 23, 2020
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
8512b5ae
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
5 deletions
+10
-5
wcfs/δbtail.go
wcfs/δbtail.go
+10
-5
No files found.
wcfs/δbtail.go
View file @
970d3243
...
@@ -726,6 +726,12 @@ func diffT(ctx context.Context, a, b *Tree, δZTC SetOid, trackIdx map[zodb.Oid]
...
@@ -726,6 +726,12 @@ func diffT(ctx context.Context, a, b *Tree, δZTC SetOid, trackIdx map[zodb.Oid]
Adone
:=
SetKey
{}
// "processed" keys on A
Adone
:=
SetKey
{}
// "processed" keys on A
Bdone
:=
SetKey
{}
// "processed" keys on B
Bdone
:=
SetKey
{}
// "processed" keys on B
if
b
!=
nil
{
// XXX precise range as for a ^^^ ?
btop
:=
&
nodeInRange
{
lo
:
KeyMin
,
hi_
:
KeyMax
,
node
:
b
}
// [-∞, ∞)
bv
=
rangeSplit
{
btop
}
}
// initial phase: expand changed nodes in a till buckets;
// initial phase: expand changed nodes in a till buckets;
// XXX changed buckets -> δ-
// XXX changed buckets -> δ-
if
a
!=
nil
{
if
a
!=
nil
{
...
@@ -772,14 +778,13 @@ func diffT(ctx context.Context, a, b *Tree, δZTC SetOid, trackIdx map[zodb.Oid]
...
@@ -772,14 +778,13 @@ func diffT(ctx context.Context, a, b *Tree, δZTC SetOid, trackIdx map[zodb.Oid]
}
}
}
}
// 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
// other side.
for
len
(
Aqueue
)
>
0
||
len
(
Bqueue
)
>
0
{
for
len
(
Aqueue
)
>
0
||
len
(
Bqueue
)
>
0
{
// expand keys in new δA -> in B till buckets;
// expand keys in new δA -> in B till buckets;
// process B buckets that cover new keys into δ+
// process B buckets that cover new keys into δ+
if
b
!=
nil
{
// XXX precise range as for a ^^^ ?
btop
:=
&
nodeInRange
{
lo
:
KeyMin
,
hi_
:
KeyMax
,
node
:
b
}
// [-∞, ∞)
bv
=
rangeSplit
{
btop
}
}
for
k
:=
range
Bqueue
{
for
k
:=
range
Bqueue
{
Bdone
.
Add
(
k
)
Bdone
.
Add
(
k
)
bbucket
,
ok
,
err
:=
bv
.
GetToBucket
(
ctx
,
k
)
bbucket
,
ok
,
err
:=
bv
.
GetToBucket
(
ctx
,
k
)
...
...
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