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
03c1da81
Commit
03c1da81
authored
Aug 04, 2021
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
89d73206
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
wcfs/internal/zdata/δftail.go
wcfs/internal/zdata/δftail.go
+5
-5
No files found.
wcfs/internal/zdata/δftail.go
View file @
03c1da81
...
...
@@ -729,7 +729,7 @@ func (δFtail *ΔFtail) BlkRevAt(ctx context.Context, zf *ZBigFile, blk int64, a
func
(
δFtail
*
ΔFtail
)
_BlkRevAt
(
ctx
context
.
Context
,
zf
*
ZBigFile
,
blk
int64
,
at
zodb
.
Tid
)
(
_
zodb
.
Tid
,
exact
bool
,
err
error
)
{
defer
xerr
.
Contextf
(
&
err
,
"blkrev f<%s> #%d @%s"
,
zf
.
POid
(),
blk
,
at
)
fmt
.
Printf
(
"
\n
blkrev #%d @%s
\n
"
,
blk
,
at
)
//
fmt.Printf("\nblkrev #%d @%s\n", blk, at)
// assert at ∈ (tail, head]
tail
:=
δFtail
.
Tail
()
...
...
@@ -754,7 +754,7 @@ func (δFtail *ΔFtail) _BlkRevAt(ctx context.Context, zf *ZBigFile, blk int64,
// find epoch that covers at and associated blktab root/object
vδE
:=
δftail
.
vδE
fmt
.
Printf
(
" vδE: %v
\n
"
,
vδE
)
//
fmt.Printf(" vδE: %v\n", vδE)
l
:=
len
(
vδE
)
i
:=
sort
.
Search
(
l
,
func
(
i
int
)
bool
{
return
at
<
vδE
[
i
]
.
Rev
...
...
@@ -780,7 +780,7 @@ func (δFtail *ΔFtail) _BlkRevAt(ctx context.Context, zf *ZBigFile, blk int64,
epoch
=
vδE
[
i
]
.
Rev
}
fmt
.
Printf
(
" epoch: @%s root: %s
\n
"
,
epoch
,
root
)
//
fmt.Printf(" epoch: @%s root: %s\n", epoch, root)
if
root
==
xbtree
.
VDEL
{
return
epoch
,
true
,
nil
...
...
@@ -788,7 +788,7 @@ func (δFtail *ΔFtail) _BlkRevAt(ctx context.Context, zf *ZBigFile, blk int64,
zblk
,
tabRev
,
zblkExact
,
tabRevExact
,
err
:=
δFtail
.
δBtail
.
GetAt
(
root
,
blk
,
at
)
fmt
.
Printf
(
" GetAt #%d @%s -> %s(%v), @%s(%v)
\n
"
,
blk
,
at
,
zblk
,
zblkExact
,
tabRev
,
tabRevExact
)
//
fmt.Printf(" GetAt #%d @%s -> %s(%v), @%s(%v)\n", blk, at, zblk, zblkExact, tabRev, tabRevExact)
if
err
!=
nil
{
return
zodb
.
InvalidTid
,
false
,
err
}
...
...
@@ -833,7 +833,7 @@ func (δFtail *ΔFtail) _BlkRevAt(ctx context.Context, zf *ZBigFile, blk int64,
// blktab[blk] was changed to point to a zblk @tabRev.
// blk revision is max rev and when zblk changed last in (rev, at] range.
zblkRev
,
zblkRevExact
:=
δFtail
.
δBtail
.
ΔZtail
()
.
LastRevOf
(
zblk
,
at
)
fmt
.
Printf
(
" ZRevOf %s @%s -> @%s, %v
\n
"
,
zblk
,
at
,
zblkRev
,
zblkRevExact
)
//
fmt.Printf(" ZRevOf %s @%s -> @%s, %v\n", zblk, at, zblkRev, zblkRevExact)
if
zblkRev
>
tabRev
{
return
zblkRev
,
zblkRevExact
,
nil
}
else
{
...
...
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