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
f626ec3e
Commit
f626ec3e
authored
Jun 15, 2021
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
a39d91af
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
5 deletions
+22
-5
wcfs/internal/xbtree/treediff.go
wcfs/internal/xbtree/treediff.go
+1
-2
wcfs/internal/xbtree/δbtail.go
wcfs/internal/xbtree/δbtail.go
+21
-3
No files found.
wcfs/internal/xbtree/treediff.go
View file @
f626ec3e
...
@@ -751,11 +751,10 @@ ABcov:
...
@@ -751,11 +751,10 @@ ABcov:
b
.
done
=
true
b
.
done
=
true
}
}
//
stop if
r coverage is complete
//
continue with next right bucket until
r coverage is complete
if
r
.
hi_
<=
b
.
hi_
{
if
r
.
hi_
<=
b
.
hi_
{
break
break
}
}
// continue with next right bucket
lo
=
b
.
hi_
+
1
lo
=
b
.
hi_
+
1
}
}
}
}
...
...
wcfs/internal/xbtree/δbtail.go
View file @
f626ec3e
...
@@ -234,6 +234,7 @@ func (δBtail *ΔBtail) Tail() zodb.Tid { return δBtail.δZtail.Tail() }
...
@@ -234,6 +234,7 @@ func (δBtail *ΔBtail) Tail() zodb.Tid { return δBtail.δZtail.Tail() }
// XXX path -> []oid ?
// XXX path -> []oid ?
//
//
// XXX catch cycles on add?
// XXX catch cycles on add?
// XXX no need to pass in key
func
(
δBtail
*
ΔBtail
)
Track
(
key
Key
,
nodePath
[]
Node
)
error
{
// XXX Tree|Bucket; path[0] = root
func
(
δBtail
*
ΔBtail
)
Track
(
key
Key
,
nodePath
[]
Node
)
error
{
// XXX Tree|Bucket; path[0] = root
path
:=
nodePathToPath
(
nodePath
)
path
:=
nodePathToPath
(
nodePath
)
...
@@ -339,20 +340,37 @@ func (δTtail *ΔTtail) rebuild(δZtail *zodb.ΔTail, db *zodb.DB) (δtrackSet P
...
@@ -339,20 +340,37 @@ func (δTtail *ΔTtail) rebuild(δZtail *zodb.ΔTail, db *zodb.DB) (δtrackSet P
// XXX update .KVAtTail, .lastRevOf
// XXX update .KVAtTail, .lastRevOf
}
}
// an iteration closer to tail may turn out to add a key to the tracking set
// an iteration closer to tail may turn out to add a key to the tracking set
.
//
we have to recheck all entries past
that revision for changes to that key
//
We have to recheck all entries newer
that revision for changes to that key
// for example:
// for example:
//
//
// XXX
// XXX
//
//
// restart from head and cycle until set of tracked keys does not grow anymore
// Implement this via restarting from head and cycling until
// set of tracked keys does not grow anymore.
if
δtkeycov
.
Empty
()
{
if
δtkeycov
.
Empty
()
{
break
break
}
}
top
:=
&
nodeInRange
{
prefix
:
nil
,
lo
:
KeyMin
,
hi_
:
KeyMax
,
node
:
root
}
V
:=
rangeSplit
{
top
}
for
_
,
r
:=
δtkeycov
.
AllRanges
()
{
for
_
,
r
:=
δtkeycov
.
AllRanges
()
{
lo
:=
r
.
lo
for
{
b
,
err
:=
V
.
GetToLeaf
(
ctx
,
lo
)
if
err
!=
nil
{
return
nil
,
err
}
}
trackNew
.
AddPath
(
b
.
Path
())
// continue with next right bucket until r coverage is complete
if
r
.
hi_
<=
b
.
hi_
{
break
}
lo
=
b
.
hi_
+
1
}
}
}
}
...
...
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