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
622d511d
Commit
622d511d
authored
3 years ago
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
7dc564f5
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
wcfs/internal/zdata/δftail.go
wcfs/internal/zdata/δftail.go
+4
-3
No files found.
wcfs/internal/zdata/δftail.go
View file @
622d511d
...
...
@@ -535,7 +535,7 @@ func (δftail *_ΔFileTail) forgetPast(revCut zodb.Tid) {
//
// Note: contrary to regular go slicing, low is exclusive while high is inclusive.
func
(
δFtail
*
ΔFtail
)
SliceByFileRev
(
zfile
*
ZBigFile
,
lo
,
hi
zodb
.
Tid
)
/*readonly*/
[]
*
ΔFile
{
//
fmt.Printf("\nslice f<%s> (@%s,@%s]\n", zfile.POid(), lo, hi)
fmt
.
Printf
(
"
\n
slice f<%s> (@%s,@%s]
\n
"
,
zfile
.
POid
(),
lo
,
hi
)
xtail
.
AssertSlice
(
δFtail
,
lo
,
hi
)
// XXX locking
...
...
@@ -635,6 +635,7 @@ func (δFtail *ΔFtail) SliceByFileRev(zfile *ZBigFile, lo, hi zodb.Tid) /*reado
Zinblk
[
zblk
]
=
inblk
.
Clone
()
}
}
fmt
.
Printf
(
"Zinblk: %v
\n
"
,
Zinblk
)
// vδT for current epoch
vδT
:=
δFtail
.
δBtail
.
SliceByRootRev
(
root
,
epoch
,
head
)
// NOTE @head, not hi
...
...
@@ -652,7 +653,7 @@ func (δFtail *ΔFtail) SliceByFileRev(zfile *ZBigFile, lo, hi zodb.Tid) /*reado
if
iz
>=
0
&&
vδZ
[
iz
]
.
Rev
>
epoch
{
δZ
:=
vδZ
[
iz
]
if
ZinblkAt
<=
δZ
.
Rev
{
//
fmt.Printf("δZ @%s\n", δZ.Rev)
fmt
.
Printf
(
"δZ @%s
\n
"
,
δZ
.
Rev
)
for
_
,
oid
:=
range
δZ
.
Changev
{
inblk
,
ok
:=
Zinblk
[
oid
]
if
ok
&&
len
(
inblk
)
!=
0
{
...
...
@@ -668,7 +669,7 @@ func (δFtail *ΔFtail) SliceByFileRev(zfile *ZBigFile, lo, hi zodb.Tid) /*reado
// δT -> adjust Zinblk + update δf
if
it
>=
0
{
δT
:=
vδT
[
it
]
//fmt.Printf("δT @%s\n", δT.Rev
)
fmt
.
Printf
(
"δT @%s %v
\n
"
,
δT
.
Rev
,
δT
.
ΔKV
)
for
blk
,
δzblk
:=
range
δT
.
ΔKV
{
// apply in reverse as we go ←
if
δzblk
.
New
!=
xbtree
.
VDEL
{
...
...
This diff is collapsed.
Click to expand it.
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