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
ac195099
Commit
ac195099
authored
Sep 13, 2021
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
3f3e0d87
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
6 deletions
+11
-6
wcfs/internal/zdata/δftail.go
wcfs/internal/zdata/δftail.go
+8
-4
wcfs/internal/zdata/δftail_test.go
wcfs/internal/zdata/δftail_test.go
+3
-2
No files found.
wcfs/internal/zdata/δftail.go
View file @
ac195099
...
...
@@ -57,7 +57,9 @@ type setOid = set.Oid
// be present. In particular a block that was not explicitly requested to be
// tracked, even if it was changed in δZ, is not guaranteed to be present in δF.
//
// XXX after epoch previous track requests has no effects
// After file epoch (file creation, deletion, or any other change to file
// object) previous track requests for that file become forgotten and has no
// further effect.
//
// ΔFtail provides the following operations:
//
...
...
@@ -97,13 +99,13 @@ type _ΔFileTail struct {
vδE
[]
_ΔFileEpoch
// changes to ZBigFile object itself ; nil if not yet rebuilt
}
// _ΔFileEpoch represent change to ZBigFile object.
// _ΔFileEpoch represent
a
change to ZBigFile object.
type
_ΔFileEpoch
struct
{
Rev
zodb
.
Tid
oldRoot
zodb
.
Oid
// .blktab was pointing to oldRoot before ; VDEL if ZBigFile deleted
newRoot
zodb
.
Oid
// .blktab was changed to point to newRoot ; ----//----
newBlkSize
int64
// .blksize was changed to newBlkSize
; -1 if ZBigFile deleted
// XXX +oldBlkSize ?
oldBlkSize
int64
// .blksize was oldBlkSize
; -1 if ZBigFile deleted
newBlkSize
int64
// .blksize was changed to newBlkSize ; ----//----
// snapshot of trackSetZBlk for this file right before this epoch
oldTrackSetZBlk
map
[
zodb
.
Oid
]
setI64
// {} zblk -> {}blk
...
...
@@ -299,6 +301,7 @@ func (δftail *_ΔFileTail) rebuild1(foid zodb.Oid, δZtail *zodb.ΔTail, db *zo
Rev
:
δZ
.
Rev
,
oldRoot
:
δ
.
blktabOld
,
newRoot
:
δ
.
blktabNew
,
oldBlkSize
:
δ
.
blksizeOld
,
newBlkSize
:
δ
.
blksizeNew
,
oldTrackSetZBlk
:
nil
,
// nothing was tracked
}
...
...
@@ -364,6 +367,7 @@ func (δFtail *ΔFtail) Update(δZ *zodb.EventCommit) (_ ΔF, err error) {
Rev
:
δZ
.
Tid
,
oldRoot
:
δ
.
blktabOld
,
newRoot
:
δ
.
blktabNew
,
oldBlkSize
:
δ
.
blksizeOld
,
newBlkSize
:
δ
.
blksizeNew
,
oldTrackSetZBlk
:
map
[
zodb
.
Oid
]
setI64
{},
}
...
...
wcfs/internal/zdata/δftail_test.go
View file @
ac195099
...
...
@@ -245,6 +245,7 @@ func testΔFtail(t_ *testing.T, testq chan ΔFTestEntry) {
Rev
:
t1
.
At
,
oldRoot
:
zodb
.
InvalidOid
,
newRoot
:
t
.
Root
(),
oldBlkSize
:
-
1
,
newBlkSize
:
blksize
,
oldTrackSetZBlk
:
nil
,
})
...
...
@@ -414,13 +415,13 @@ func testΔFtail(t_ *testing.T, testq chan ΔFTestEntry) {
if
delfile
{
δE
.
oldRoot
=
t
.
Root
()
δE
.
newRoot
=
zodb
.
InvalidOid
δE
.
oldBlkSize
=
blksize
δE
.
newBlkSize
=
-
1
// XXX oldBlkSize ?
}
else
{
δE
.
oldRoot
=
zodb
.
InvalidOid
δE
.
newRoot
=
t
.
Root
()
δE
.
oldBlkSize
=
-
1
δE
.
newBlkSize
=
blksize
// XXX oldBlkSize ?
}
oldTrackSetZBlk
:=
map
[
zodb
.
Oid
]
setI64
{}
for
zblk
,
inblk
:=
range
ZinblkPrev
{
...
...
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