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
a35804be
Commit
a35804be
authored
Jul 11, 2021
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
eb8703df
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2 additions
and
8 deletions
+2
-8
wcfs/internal/xbtree/δbtail.go
wcfs/internal/xbtree/δbtail.go
+1
-4
wcfs/internal/zdata/δftail.go
wcfs/internal/zdata/δftail.go
+0
-4
wcfs/internal/zdata/δftail_test.go
wcfs/internal/zdata/δftail_test.go
+1
-0
No files found.
wcfs/internal/xbtree/δbtail.go
View file @
a35804be
...
...
@@ -771,17 +771,14 @@ func (δBtail *ΔBtail) GetAt(ctx context.Context, root *Tree, key Key, at zodb.
// XXX handle deletion
// FIXME stub -> that only ZBlk.rev is used
//return @head, rev=.Tail(), revExact=false
// XXX dirty -> rebuild
// XXX -> index lastXXXOf(key) | linear scan ↓ looking for change <= at
δTtail
:=
δBtail
.
vδTbyRoot
[
root
.
POid
()]
if
δTtail
==
nil
{
panicf
(
"δBtail: root<%s> not tracked"
,
root
.
POid
())
}
// XXX -> index lastXXXOf(key) | linear scan ↓ looking for change <= at
for
i
:=
len
(
δTtail
.
vδT
)
-
1
;
i
>=
0
;
i
--
{
δT
:=
δTtail
.
vδT
[
i
]
if
at
<
δT
.
Rev
{
...
...
wcfs/internal/zdata/δftail.go
View file @
a35804be
...
...
@@ -464,8 +464,6 @@ func (δFtail *ΔFtail) SliceByFileRev(zfile *ZBigFile, lo, hi zodb.Tid) /*reado
func
(
δFtail
*
ΔFtail
)
LastBlkRev
(
ctx
context
.
Context
,
zf
*
ZBigFile
,
blk
int64
,
at
zodb
.
Tid
)
(
_
zodb
.
Tid
,
exact
bool
)
{
//defer xerr.Contextf(&err, "") // XXX text
// XXX assert δFtail == f.head.bfdir.δFtail ?
// XXX tabRev -> treeRev ?
// XXX activate zfile?
zblkOid
,
ok
,
tabRev
,
tabRevExact
,
err
:=
δFtail
.
δBtail
.
GetAt
(
ctx
,
zf
.
blktab
,
blk
,
at
)
...
...
@@ -481,8 +479,6 @@ func (δFtail *ΔFtail) LastBlkRev(ctx context.Context, zf *ZBigFile, blk int64,
// blktab[blk] was changed to point to a zblk @rev.
// blk revision is max rev and when zblk changed last in (rev, at] range.
//
// XXX need to use full δZ, not only connected to tracked subset?
zblkRev
,
zblkRevExact
:=
δFtail
.
δBtail
.
ΔZtail
()
.
LastRevOf
(
zblkOid
,
at
)
if
zblkRev
>
tabRev
{
return
zblkRev
,
zblkRevExact
...
...
wcfs/internal/zdata/δftail_test.go
View file @
a35804be
...
...
@@ -289,6 +289,7 @@ func testΔFtail(t_ *testing.T, testq chan ΔFTestEntry) {
for
blk
:=
range
δblk
{
blkRev
[
blk
]
=
commit
.
At
}
blkRevAt
[
commit
.
At
]
=
blkRev
var
δfok
*
ΔFile
if
len
(
δblk
)
!=
0
{
...
...
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