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
ef2f2d77
Commit
ef2f2d77
authored
Jun 11, 2021
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
fc61ff19
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
5 deletions
+10
-5
wcfs/internal/xbtree/treediff.go
wcfs/internal/xbtree/treediff.go
+10
-5
No files found.
wcfs/internal/xbtree/treediff.go
View file @
ef2f2d77
...
...
@@ -83,7 +83,7 @@ import (
)
const
traceDiff
=
true
const
debugDiff
=
fals
e
const
debugDiff
=
tru
e
// ΔValue represents change in value.
type
ΔValue
struct
{
...
...
@@ -334,6 +334,7 @@ func treediff(ctx context.Context, root zodb.Oid, δtops SetOid, δZTC SetOid, t
δtkeycov
=
&
RangedKeySet
{}
tracefDiff
(
"
\n
treediff %s δtops: %v δZTC: %v
\n
"
,
root
,
δtops
,
δZTC
)
tracefDiff
(
" trackSet: %v
\n
"
,
trackSet
)
defer
tracefDiff
(
"
\n
-> δT: %v
\n
δtrack: %v
\n
δtkeycov: %v
\n
"
,
δT
,
δtrack
,
δtkeycov
)
δtrackv
:=
[]
*
ΔPPTreeSubSet
{}
...
...
@@ -558,9 +559,10 @@ func diffT(ctx context.Context, A, B *Tree, δZTC SetOid, trackSet PPTreeSubSet)
// a is bucket -> δ-
δA
,
err
:=
diffB
(
ctx
,
a
,
nil
);
/*X*/
if
err
!=
nil
{
return
nil
,
nil
,
nil
,
err
}
err
=
δMerge
(
δ
,
δA
);
/*X*/
if
err
!=
nil
{
return
nil
,
nil
,
nil
,
err
}
δtrack
.
Del
.
AddPath
(
ra
.
Path
())
ar
:=
KeyRange
{
ra
.
lo
,
ra
.
hi_
}
δtrack
.
Del
.
AddPath
(
ra
.
Path
())
δtkeycovADel
.
AddRange
(
ar
)
debugfDiff
(
" δtrack - %s %v
\n
"
,
ar
,
ra
.
Path
())
// Bkqueue <- ra.range
Bktodo
(
ar
)
...
...
@@ -633,6 +635,7 @@ func diffT(ctx context.Context, A, B *Tree, δZTC SetOid, trackSet PPTreeSubSet)
δtrack
.
δnchildNonLeafs
[
acOid
]
=
nc
}
// XXX δtkeycov
// debugfDiff(" δtrack - %s %v\n", ar, ra.Path())
}
continue
...
...
@@ -687,9 +690,10 @@ func diffT(ctx context.Context, A, B *Tree, δZTC SetOid, trackSet PPTreeSubSet)
// δ <- δB
err
=
δMerge
(
δ
,
δB
);
/*X*/
if
err
!=
nil
{
return
nil
,
nil
,
nil
,
err
}
δtrack
.
Add
.
AddPath
(
b
.
Path
())
br
:=
KeyRange
{
b
.
lo
,
b
.
hi_
}
δtrack
.
Add
.
AddPath
(
b
.
Path
())
δtkeycovBAdd
.
AddRange
(
br
)
debugfDiff
(
" δtrack + %s %v
\n
"
,
br
,
b
.
Path
())
// Akqueue <- δB
Bkdone
.
AddRange
(
br
)
...
...
@@ -726,10 +730,11 @@ func diffT(ctx context.Context, A, B *Tree, δZTC SetOid, trackSet PPTreeSubSet)
// δ <- δA
err
=
δMerge
(
δ
,
δA
);
/*X*/
if
err
!=
nil
{
return
nil
,
nil
,
nil
,
err
}
δtrack
.
Del
.
AddPath
(
a
.
Path
())
ar
:=
KeyRange
{
a
.
lo
,
a
.
hi_
}
δtkeycovADel
.
AddRange
(
ar
)
// NOTE *no* δtkeycovADel change here - A keys reached in phase 2 were not originally tracked.
debugfDiff
(
" δtrack - [) %v
\n
"
,
a
.
Path
()
)
// Bkqueue <- a.range
ar
:=
KeyRange
{
a
.
lo
,
a
.
hi_
}
Akdone
.
AddRange
(
ar
)
Bktodo
(
ar
)
...
...
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