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
568dbab5
Commit
568dbab5
authored
Oct 13, 2021
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
a36307f2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
8 deletions
+15
-8
wcfs/internal/zdata/δftail.go
wcfs/internal/zdata/δftail.go
+15
-8
No files found.
wcfs/internal/zdata/δftail.go
View file @
568dbab5
...
...
@@ -303,7 +303,7 @@ func (δFtail *ΔFtail) rebuildAll() (err error) {
for
foid
:=
range
δFtail
.
trackNew
{
δFtail
.
trackNew
.
Del
(
foid
)
δftail
:=
δFtail
.
byFile
[
foid
]
err
:=
δftail
.
_rebuild1
(
foid
,
δZtail
,
db
)
δftail
.
vδE
,
err
=
vδEBuild
(
foid
,
δZtail
,
db
)
if
err
!=
nil
{
return
err
}
...
...
@@ -323,17 +323,21 @@ func (δFtail *ΔFtail) rebuild1IfNeeded(foid zodb.Oid) (vδE []_ΔFileEpoch, he
defer
δFtail
.
mu
.
Unlock
()
δftail
:=
δFtail
.
byFile
[
foid
]
if
δftail
.
vδE
!=
nil
{
err
=
nil
}
else
{
//
if
δftail
.
vδE
==
nil
{
δFtail
.
trackNew
.
Del
(
foid
)
δBtail
:=
δFtail
.
δBtail
err
=
δftail
.
_rebuild1
(
foid
,
δBtail
.
ΔZtail
(),
δBtail
.
DB
())
// XXX indicate rebuild via job
δFtail
.
mu
.
Unlock
()
// err = δftail._rebuild1(foid, δBtail.ΔZtail(), δBtail.DB())
vδE
,
err
=
vδEBuild
(
foid
,
δBtail
.
ΔZtail
(),
δBtail
.
DB
())
δFtail
.
mu
.
Lock
()
δftail
.
vδE
=
vδE
}
return
δftail
.
vδE
,
δftail
.
root
,
err
return
vδE
,
δftail
.
root
,
err
}
/* XXX kill
// _rebuild1 rebuilds vδE.
//
// XXX -> redo to just return built vδE (vδEBuild)
...
...
@@ -354,6 +358,7 @@ func (δftail *_ΔFileTail) _rebuild1(foid zodb.Oid, δZtail *zodb.ΔTail, db *z
δftail.vδE = vδE
return nil
}
*/
// Update updates δFtail given raw ZODB changes.
//
...
...
@@ -676,7 +681,9 @@ func (δFtail *ΔFtail) SliceByFileRev(zfile *ZBigFile, lo, hi zodb.Tid) /*reado
root
=
δE
.
oldRoot
head
=
δE
.
Rev
-
1
// TODO better set to exact revision coming before δE.Rev
for
zblk
,
inblk
:=
range
δE
.
oldTrackSetZBlk
{
Zinblk
[
zblk
]
=
inblk
.
Clone
()
Zinblk
[
zblk
]
=
inblk
.
Clone
()
// XXX Clone needed ? -> just use oldTrackSetZBlk directly
// XXX -> just use Zinblk = δE.oldTrackSetZBlk directly (without full clone)
// XXX no -> vvv we adjust Zinblk -> thinking
}
}
//fmt.Printf("Zinblk: %v\n", Zinblk)
...
...
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