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
febbe835
Commit
febbe835
authored
Aug 06, 2021
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
622d511d
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 @
febbe835
...
@@ -207,7 +207,7 @@ func (δFtail *ΔFtail) Track(file *ZBigFile, blk int64, path []btree.LONode, zb
...
@@ -207,7 +207,7 @@ func (δFtail *ΔFtail) Track(file *ZBigFile, blk int64, path []btree.LONode, zb
}
}
// associate zblk with
file
, if it was not hole
// associate zblk with
root
, if it was not hole
if
zblk
!=
nil
{
if
zblk
!=
nil
{
zoid
:=
zblk
.
POid
()
zoid
:=
zblk
.
POid
()
zt
,
ok
:=
δFtail
.
trackSetZBlk
[
zoid
]
zt
,
ok
:=
δFtail
.
trackSetZBlk
[
zoid
]
...
@@ -535,7 +535,7 @@ func (δftail *_ΔFileTail) forgetPast(revCut zodb.Tid) {
...
@@ -535,7 +535,7 @@ func (δftail *_ΔFileTail) forgetPast(revCut zodb.Tid) {
//
//
// Note: contrary to regular go slicing, low is exclusive while high is inclusive.
// 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
{
func
(
δFtail
*
ΔFtail
)
SliceByFileRev
(
zfile
*
ZBigFile
,
lo
,
hi
zodb
.
Tid
)
/*readonly*/
[]
*
ΔFile
{
fmt
.
Printf
(
"
\n
slice f<%s> (@%s,@%s]
\n
"
,
zfile
.
POid
(),
lo
,
hi
)
//
fmt.Printf("\nslice f<%s> (@%s,@%s]\n", zfile.POid(), lo, hi)
xtail
.
AssertSlice
(
δFtail
,
lo
,
hi
)
xtail
.
AssertSlice
(
δFtail
,
lo
,
hi
)
// XXX locking
// XXX locking
...
@@ -635,7 +635,7 @@ func (δFtail *ΔFtail) SliceByFileRev(zfile *ZBigFile, lo, hi zodb.Tid) /*reado
...
@@ -635,7 +635,7 @@ func (δFtail *ΔFtail) SliceByFileRev(zfile *ZBigFile, lo, hi zodb.Tid) /*reado
Zinblk
[
zblk
]
=
inblk
.
Clone
()
Zinblk
[
zblk
]
=
inblk
.
Clone
()
}
}
}
}
fmt
.
Printf
(
"Zinblk: %v
\n
"
,
Zinblk
)
//
fmt.Printf("Zinblk: %v\n", Zinblk)
// vδT for current epoch
// vδT for current epoch
vδT
:=
δFtail
.
δBtail
.
SliceByRootRev
(
root
,
epoch
,
head
)
// NOTE @head, not hi
vδT
:=
δFtail
.
δBtail
.
SliceByRootRev
(
root
,
epoch
,
head
)
// NOTE @head, not hi
...
@@ -653,7 +653,7 @@ func (δFtail *ΔFtail) SliceByFileRev(zfile *ZBigFile, lo, hi zodb.Tid) /*reado
...
@@ -653,7 +653,7 @@ func (δFtail *ΔFtail) SliceByFileRev(zfile *ZBigFile, lo, hi zodb.Tid) /*reado
if
iz
>=
0
&&
vδZ
[
iz
]
.
Rev
>
epoch
{
if
iz
>=
0
&&
vδZ
[
iz
]
.
Rev
>
epoch
{
δZ
:=
vδZ
[
iz
]
δZ
:=
vδZ
[
iz
]
if
ZinblkAt
<=
δZ
.
Rev
{
if
ZinblkAt
<=
δZ
.
Rev
{
fmt
.
Printf
(
"δZ @%s
\n
"
,
δZ
.
Rev
)
//
fmt.Printf("δZ @%s\n", δZ.Rev)
for
_
,
oid
:=
range
δZ
.
Changev
{
for
_
,
oid
:=
range
δZ
.
Changev
{
inblk
,
ok
:=
Zinblk
[
oid
]
inblk
,
ok
:=
Zinblk
[
oid
]
if
ok
&&
len
(
inblk
)
!=
0
{
if
ok
&&
len
(
inblk
)
!=
0
{
...
@@ -669,7 +669,7 @@ func (δFtail *ΔFtail) SliceByFileRev(zfile *ZBigFile, lo, hi zodb.Tid) /*reado
...
@@ -669,7 +669,7 @@ func (δFtail *ΔFtail) SliceByFileRev(zfile *ZBigFile, lo, hi zodb.Tid) /*reado
// δT -> adjust Zinblk + update δf
// δT -> adjust Zinblk + update δf
if
it
>=
0
{
if
it
>=
0
{
δT
:=
vδT
[
it
]
δT
:=
vδT
[
it
]
fmt
.
Printf
(
"δT @%s %v
\n
"
,
δT
.
Rev
,
δT
.
ΔKV
)
//
fmt.Printf("δT @%s %v\n", δT.Rev, δT.ΔKV)
for
blk
,
δzblk
:=
range
δT
.
ΔKV
{
for
blk
,
δzblk
:=
range
δT
.
ΔKV
{
// apply in reverse as we go ←
// apply in reverse as we go ←
if
δzblk
.
New
!=
xbtree
.
VDEL
{
if
δzblk
.
New
!=
xbtree
.
VDEL
{
...
...
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