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
ece1c216
Commit
ece1c216
authored
Jun 24, 2020
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
8b595000
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
7 deletions
+14
-7
wcfs/δbtail.go
wcfs/δbtail.go
+14
-7
No files found.
wcfs/δbtail.go
View file @
ece1c216
...
...
@@ -877,7 +877,6 @@ func diffT(ctx context.Context, a, b *Tree, δZTC SetOid, trackIdx map[zodb.Oid]
Aqueue
=
SetKey
{}
for
k
:=
range
Bqueue
{
fmt
.
Printf
(
" B [%v]
\n
"
,
k
)
Bdone
.
Add
(
k
)
bnode
,
ok
,
err
:=
bv
.
GetToLeaf
(
ctx
,
k
)
if
err
!=
nil
{
return
nil
,
err
...
...
@@ -889,8 +888,7 @@ func diffT(ctx context.Context, a, b *Tree, δZTC SetOid, trackIdx map[zodb.Oid]
// XXX check for bnode.node.(*Tree) (ø tree case)
// + bucket if not already done
// XXX update track.hole if k not in bbucket
// +bucket if that bucket is reached for the first time
if
!
bnode
.
done
{
δB
,
err
:=
diffB
(
ctx
,
nil
,
bnode
.
node
.
(
*
Bucket
))
if
err
!=
nil
{
...
...
@@ -903,16 +901,25 @@ func diffT(ctx context.Context, a, b *Tree, δZTC SetOid, trackIdx map[zodb.Oid]
return
nil
,
err
}
// Bdone <- δB
// Aqueue <- δB
for
k
:=
range
δB
{
if
!
Adone
.
Has
(
k
)
{
Aqueue
.
Add
(
k
)
for
k_
:=
range
δB
{
Bdone
.
Add
(
k_
)
if
!
Adone
.
Has
(
k_
)
{
Aqueue
.
Add
(
k_
)
}
}
bnode
.
done
=
true
}
// add k as hole if k is not there
if
!
Bdone
.
Has
(
k
)
{
δB
:=
map
[
Key
]
ΔValue
{
k
:
{
VDEL
,
VDEL
}}
// hole
err
=
δMerge
(
δ
,
δB
);
if
err
!=
nil
{
return
nil
,
err
}
Bdone
.
Add
(
k
)
}
fmt
.
Printf
(
" bv: %s
\n
"
,
bv
)
}
...
...
@@ -1000,7 +1007,7 @@ func δMerge(δ, δ2 map[Key]ΔValue) error {
if
δv
.
Old
!=
δv
.
New
{
δ
[
k
]
=
δv
}
else
{
delete
(
δ
,
k
)
delete
(
δ
,
k
)
// NOTE also annihilates hole migration
}
}
...
...
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