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
73811795
Commit
73811795
authored
Oct 13, 2021
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
e8804bd5
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 @
73811795
...
...
@@ -664,7 +664,7 @@ func (δFtail *ΔFtail) SliceByFileRev(zfile *ZBigFile, lo, hi zodb.Tid) /*reado
// head
root
=
headRoot
head
=
δFtail
.
Head
()
for
zblk
,
zt
:=
range
δFtail
.
trackSetZBlk
{
for
zblk
,
zt
:=
range
δFtail
.
trackSetZBlk
{
// XXX locking
inblk
,
ok
:=
zt
.
inroot
[
root
]
if
ok
{
Zinblk
[
zblk
]
=
inblk
.
Clone
()
...
...
@@ -847,16 +847,12 @@ func (δFtail *ΔFtail) _BlkRevAt(ctx context.Context, zfile *ZBigFile, blk int6
panicf
(
"zconn.at out of bounds: zconn.at: @%s, (tail, head] = (@%s, @%s]"
,
zconnAt
,
tail
,
head
)
}
// XXX locking
// δftail, err := δFtail.rebuild1IfNeeded(foid)
vδE
,
headRoot
,
err
:=
δFtail
.
rebuild1IfNeeded
(
foid
)
if
err
!=
nil
{
return
zodb
.
InvalidTid
,
false
,
err
}
// find epoch that covers at and associated blktab root/object
// vδE := δftail.vδE
//fmt.Printf(" vδE: %v\n", vδE)
l
:=
len
(
vδE
)
i
:=
sort
.
Search
(
l
,
func
(
i
int
)
bool
{
...
...
@@ -868,7 +864,6 @@ func (δFtail *ΔFtail) _BlkRevAt(ctx context.Context, zfile *ZBigFile, blk int6
// root
var
root
zodb
.
Oid
if
i
==
l
{
// root = δftail.root
root
=
headRoot
}
else
{
root
=
vδE
[
i
]
.
oldRoot
...
...
@@ -879,7 +874,7 @@ func (δFtail *ΔFtail) _BlkRevAt(ctx context.Context, zfile *ZBigFile, blk int6
i
--
if
i
<
0
{
// i<0 - first epoch (no explicit start) - use δFtail.tail as lo
epoch
=
δFtail
.
Tail
()
epoch
=
tail
}
else
{
epoch
=
vδE
[
i
]
.
Rev
}
...
...
@@ -948,9 +943,7 @@ func (δFtail *ΔFtail) _BlkRevAt(ctx context.Context, zfile *ZBigFile, blk int6
// ---- vδEBuild (rebuild core) ----
// vδEBuild builds vδE from vδZ for file.
//
// XXX place ok?
// vδEBuild builds vδE for file from vδZ.
func
vδEBuild
(
foid
zodb
.
Oid
,
δZtail
*
zodb
.
ΔTail
,
db
*
zodb
.
DB
)
(
vδE
[]
_ΔFileEpoch
,
err
error
)
{
defer
xerr
.
Contextf
(
&
err
,
"file<%s>: build vδE"
,
foid
)
...
...
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