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
f9d2c4e8
Commit
f9d2c4e8
authored
Oct 18, 2021
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
4795d8d5
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
5 deletions
+11
-5
wcfs/internal/zdata/δftail.go
wcfs/internal/zdata/δftail.go
+11
-5
No files found.
wcfs/internal/zdata/δftail.go
View file @
f9d2c4e8
...
@@ -141,7 +141,7 @@ type ΔFtail struct {
...
@@ -141,7 +141,7 @@ type ΔFtail struct {
// mu protects ΔFtail data _and_ all _ΔFileTail/_RootTrack data for all files and roots.
// mu protects ΔFtail data _and_ all _ΔFileTail/_RootTrack data for all files and roots.
//
//
// NOTE: even though this lock is global it is used only for brief perio
u
ds of time. In
// NOTE: even though this lock is global it is used only for brief periods of time. In
// particular working with retrieved vδE and Zinblk snapshot does not need to hold the lock.
// particular working with retrieved vδE and Zinblk snapshot does not need to hold the lock.
mu
sync
.
Mutex
mu
sync
.
Mutex
...
@@ -557,7 +557,16 @@ func (δFtail *ΔFtail) Update(δZ *zodb.EventCommit) (_ ΔF, err error) {
...
@@ -557,7 +557,16 @@ func (δFtail *ΔFtail) Update(δZ *zodb.EventCommit) (_ ΔF, err error) {
rt
.
ftrackSet
.
Del
(
foid
)
rt
.
ftrackSet
.
Del
(
foid
)
if
len
(
rt
.
ftrackSet
)
==
0
{
if
len
(
rt
.
ftrackSet
)
==
0
{
delete
(
δFtail
.
byRoot
,
δ
.
blktabOld
)
delete
(
δFtail
.
byRoot
,
δ
.
blktabOld
)
// XXX reset Zinroot -= δ.blktabNew
// Zinroot -= δ.blktabNew
for
zoid
:=
range
rt
.
ztrackInBlk
{
inroot
,
ok
:=
δFtail
.
ztrackInRoot
[
zoid
]
if
ok
{
inroot
.
Del
(
δ
.
blktabOld
)
if
len
(
inroot
)
==
0
{
delete
(
δFtail
.
ztrackInRoot
,
zoid
)
}
}
}
}
}
}
}
}
}
...
@@ -567,7 +576,6 @@ func (δFtail *ΔFtail) Update(δZ *zodb.EventCommit) (_ ΔF, err error) {
...
@@ -567,7 +576,6 @@ func (δFtail *ΔFtail) Update(δZ *zodb.EventCommit) (_ ΔF, err error) {
rt
=
&
_RootTrack
{
rt
=
&
_RootTrack
{
ftrackSet
:
setOid
{},
ftrackSet
:
setOid
{},
ztrackInBlk
:
map
[
zodb
.
Oid
]
setI64
{},
ztrackInBlk
:
map
[
zodb
.
Oid
]
setI64
{},
// XXX reset Zinroot -= δ.blktabNew
}
}
δFtail
.
byRoot
[
δ
.
blktabNew
]
=
rt
δFtail
.
byRoot
[
δ
.
blktabNew
]
=
rt
}
}
...
@@ -795,14 +803,12 @@ func (δFtail *ΔFtail) SliceByFileRev(zfile *ZBigFile, lo, hi zodb.Tid) /*reado
...
@@ -795,14 +803,12 @@ func (δFtail *ΔFtail) SliceByFileRev(zfile *ZBigFile, lo, hi zodb.Tid) /*reado
Zinblk
.
Adj
=
map
[
zodb
.
Oid
]
setI64
{}
Zinblk
.
Adj
=
map
[
zodb
.
Oid
]
setI64
{}
for
_
,
δT
:=
range
vδT
{
for
_
,
δT
:=
range
vδT
{
for
blk
,
δzblk
:=
range
δT
.
KV
{
for
blk
,
δzblk
:=
range
δT
.
KV
{
// XXX VDEL -> whiteout?
if
δzblk
.
Old
!=
xbtree
.
VDEL
{
if
δzblk
.
Old
!=
xbtree
.
VDEL
{
inblk
,
ok
:=
Zinblk
.
Adj
[
δzblk
.
Old
]
inblk
,
ok
:=
Zinblk
.
Adj
[
δzblk
.
Old
]
if
ok
{
if
ok
{
inblk
.
Del
(
blk
)
inblk
.
Del
(
blk
)
}
}
}
}
// XXX VDEL -> whiteout?
if
δzblk
.
New
!=
xbtree
.
VDEL
{
if
δzblk
.
New
!=
xbtree
.
VDEL
{
inblk
,
ok
:=
Zinblk
.
Adj
[
δzblk
.
New
]
inblk
,
ok
:=
Zinblk
.
Adj
[
δzblk
.
New
]
if
!
ok
{
if
!
ok
{
...
...
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