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
0e46b293
Commit
0e46b293
authored
Sep 13, 2021
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
ac195099
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
10 deletions
+3
-10
wcfs/internal/zdata/δftail.go
wcfs/internal/zdata/δftail.go
+3
-10
No files found.
wcfs/internal/zdata/δftail.go
View file @
0e46b293
...
...
@@ -96,7 +96,7 @@ type ΔFtail struct {
// _ΔFileTail represents tail of revisional changes to one file.
type
_ΔFileTail
struct
{
root
zodb
.
Oid
// .blktab as of @head
vδE
[]
_ΔFileEpoch
//
changes to ZBigFile object itself
; nil if not yet rebuilt
vδE
[]
_ΔFileEpoch
//
epochs (changes to ZBigFile object itself)
; nil if not yet rebuilt
}
// _ΔFileEpoch represent a change to ZBigFile object.
...
...
@@ -202,7 +202,8 @@ func (δFtail *ΔFtail) Track(file *ZBigFile, blk int64, path []btree.LONode, zb
δFtail
.
trackNew
.
Add
(
foid
)
}
if
δftail
.
root
!=
roid
{
panicf
(
"zfile<%s> changed root from %s -> %s"
,
foid
,
δftail
.
root
,
roid
)
// .root can change during epochs, but in between them it must be stable
panicf
(
"BUG: zfile<%s> root mutated from %s -> %s"
,
foid
,
δftail
.
root
,
roid
)
}
...
...
@@ -320,16 +321,9 @@ func (δftail *_ΔFileTail) rebuild1(foid zodb.Oid, δZtail *zodb.ΔTail, db *zo
// It returns change in files space that corresponds to δZ.
//
// δZ should include all objects changed by ZODB transaction.
//
// XXX readd zhead?
// // Zhead must be active connection at δFtail.Head() database state.
// // Objects in Zhead must not be modified.
// // During call to Update zhead must not be otherwise used - even for reading.
//func (δFtail *ΔFtail) Update(δZ *zodb.EventCommit, zhead *xzodb.ZConn) (_ ΔF, err error) {
func
(
δFtail
*
ΔFtail
)
Update
(
δZ
*
zodb
.
EventCommit
)
(
_
ΔF
,
err
error
)
{
defer
xerr
.
Contextf
(
&
err
,
"ΔFtail update %s -> %s"
,
δFtail
.
Head
(),
δZ
.
Tid
)
// XXX verify zhead.At() == δFtail.Head()
// XXX locking
// rebuild vδE for newly tracked files
...
...
@@ -361,7 +355,6 @@ func (δFtail *ΔFtail) Update(δZ *zodb.EventCommit) (_ ΔF, err error) {
//fmt.Printf("zfile<%s> diff %s..%s -> δ: %v\n", oid, headOld, δZ.Tid, δ)
if
δ
!=
nil
{
// XXX rebuild first
δzfile
[
oid
]
=
δ
δE
:=
_ΔFileEpoch
{
Rev
:
δZ
.
Tid
,
...
...
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