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
a39d91af
Commit
a39d91af
authored
Jun 15, 2021
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
4fe7b39c
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
7 deletions
+26
-7
wcfs/internal/xbtree/δbtail.go
wcfs/internal/xbtree/δbtail.go
+25
-6
wcfs/internal/zdata/δftail.go
wcfs/internal/zdata/δftail.go
+1
-1
No files found.
wcfs/internal/xbtree/δbtail.go
View file @
a39d91af
...
...
@@ -313,7 +313,9 @@ func (δTtail *ΔTtail) rebuild(δZtail *zodb.ΔTail, db *zodb.DB) (δtrackSet P
// go backwards and merge vδT <- treediff(lo..hi/trackNew)
vδZ
:=
δZtail
.
Data
()
// vδtrack := []*ΔPPTreeSubSet{}
for
{
δtkeycov
:=
&
RangedKeySet
{}
// all keys coming into tracking set during this lo..hi scan
trackNewCur
:=
trackNew
.
Clone
()
for
i
:=
len
(
vδZ
)
-
1
;
i
>=
0
;
i
--
{
δZ
:=
vδZ
[
i
]
...
...
@@ -326,18 +328,34 @@ func (δTtail *ΔTtail) rebuild(δZtail *zodb.ΔTail, db *zodb.DB) (δtrackSet P
atPrev
=
δZtail
.
Tail
()
}
δtrackNew
,
δtkeycov
,
err
:=
δTtail
.
rebuild1
(
atPrev
,
δZ
,
trackNew
,
db
)
δtrackNew
,
δtkeycov_
,
err
:=
δTtail
.
rebuild1
(
atPrev
,
δZ
,
trackNewCur
,
db
)
if
err
!=
nil
{
return
nil
,
err
}
trackNew
.
ApplyΔ
(
δtrackNew
)
// FIXME use δtkeycov to recompute track coverage
_
=
δtkeycov
trackNewCur
.
ApplyΔ
(
δtrackNew
)
δtkeycov
.
UnionInplace
(
δtkeycov_
)
// XXX update .KVAtTail, .lastRevOf
}
// 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
// for example:
//
// XXX
//
// restart from head and cycle until set of tracked keys does not grow anymore
if
δtkeycov
.
Empty
()
{
break
}
for
_
,
r
:=
δtkeycov
.
AllRanges
()
{
}
}
/*
// trackNew was adjusted to correspond to @tail potentially growing its key coverage.
// Remap it back to @head and merge to .trackSet
...
...
@@ -346,8 +364,9 @@ func (δTtail *ΔTtail) rebuild(δZtail *zodb.ΔTail, db *zodb.DB) (δtrackSet P
trackNew.ApplyΔ(δtrack)
}
δBtail.trackSet.UnionInplace(trackNew)
*/
return δtrackSet, nil
*/
return
trackNew
}
// rebuild1 rebuilds δT for single δZ.
...
...
wcfs/internal/zdata/δftail.go
View file @
a39d91af
...
...
@@ -160,7 +160,7 @@ func (δFtail *ΔFtail) Track(file *ZBigFile, blk int64, path []btree.LONode, zb
// XXX blk = ∞ from beginning ?
blk
=
xbtree
.
KeyMax
}
err
:=
δFtail
.
δBtail
.
Track
(
blk
,
zblk
!=
nil
,
path
)
err
:=
δFtail
.
δBtail
.
Track
(
blk
,
path
)
if
err
!=
nil
{
panic
(
err
)
// XXX -> error? errctx
}
...
...
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