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
1c577863
Commit
1c577863
authored
Jun 23, 2020
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
b34819df
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
8 deletions
+12
-8
wcfs/δbtail.go
wcfs/δbtail.go
+12
-8
No files found.
wcfs/δbtail.go
View file @
1c577863
...
...
@@ -719,8 +719,12 @@ func diffT(ctx context.Context, a, b *Tree, δZTC SetOid, trackIdx map[zodb.Oid]
δ
=
map
[
Key
]
ΔValue
{}
defer
fmt
.
Printf
(
" -> δt: %v
\n
"
,
δ
)
var
av
rangeSplit
// nodes expanded from a
var
bv
rangeSplit
// nodes expanded from b
var
av
rangeSplit
// nodes expanded from a
var
bv
rangeSplit
// nodes expanded from b
Aqueue
:=
SetKey
{}
// "to process" keys on A
Bqueue
:=
SetKey
{}
// "to process" keys on B
Adone
:=
SetKey
{}
// "processed" keys on A
Bdone
:=
SetKey
{}
// "processed" keys on B
// initial phase: expand changed nodes in a till buckets;
// XXX changed buckets -> δ-
...
...
@@ -754,7 +758,7 @@ func diffT(ctx context.Context, a, b *Tree, δZTC SetOid, trackIdx map[zodb.Oid]
// δ <- δA
δMerge
(
δ
,
δA
)
// XXX A
KeysD
one <- δA
// XXX A
d
one <- δA
// XXX Bqueue <- δA
}
}
...
...
@@ -769,8 +773,8 @@ func diffT(ctx context.Context, a, b *Tree, δZTC SetOid, trackIdx map[zodb.Oid]
btop
:=
&
nodeInRange
{
lo
:
KeyMin
,
hi_
:
KeyMax
,
node
:
b
}
// [-∞, ∞)
bv
=
rangeSplit
{
btop
}
}
for
k
:=
range
B
keysq
{
B
KeysD
one
.
Add
(
k
)
for
k
:=
range
B
queue
{
B
d
one
.
Add
(
k
)
bbucket
,
ok
,
err
:=
bv
.
GetToBucket
(
ctx
,
k
)
if
!
ok
{
continue
// key not covered
...
...
@@ -786,10 +790,10 @@ func diffT(ctx context.Context, a, b *Tree, δZTC SetOid, trackIdx map[zodb.Oid]
// δ <- δB
δMerge
(
δ
,
δB
)
//
XXX
Aqueue <- δB
// Aqueue <- δB
for
k
,
δv
:=
range
δ
{
if
!
A
KeysD
one
.
Has
(
k
)
{
A
keysq
.
Add
(
k
)
if
!
A
d
one
.
Has
(
k
)
{
A
queue
.
Add
(
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