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
2812f85e
Commit
2812f85e
authored
May 11, 2021
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
d24d23a7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
wcfs/δbtail.go
wcfs/δbtail.go
+6
-4
No files found.
wcfs/δbtail.go
View file @
2812f85e
...
@@ -746,13 +746,15 @@ func (δBtail *ΔBtail) Update(δZ *zodb.EventCommit) (_ ΔB, err error) {
...
@@ -746,13 +746,15 @@ func (δBtail *ΔBtail) Update(δZ *zodb.EventCommit) (_ ΔB, err error) {
// update .trackIdx and vδB from .trackNew
// update .trackIdx and vδB from .trackNew
δBtail
.
rebuild
()
δBtail
.
rebuild
()
tracef
(
"Update δZ: %v
\n
"
,
δZ
.
Changev
)
tracef
(
"Update @%s -> @%s
\n
"
,
δBtail
.
Head
(),
δZ
.
Tid
)
tracef
(
"δZ:
\t
%v
\n
"
,
δZ
.
Changev
)
tracef
(
"trackIdx: %v
\n
"
,
δBtail
.
trackIdx
)
tracef
(
"trackIdx: %v
\n
"
,
δBtail
.
trackIdx
)
tracef
(
"holeIdxByRoot: %v
\n
"
,
δBtail
.
holeIdxByRoot
)
tracef
(
"holeIdxByRoot: %v
\n
"
,
δBtail
.
holeIdxByRoot
)
// XXX dup wrt rebuild?
// XXX dup wrt rebuild?
δBtail
.
δZtail
.
Append
(
δZ
.
Tid
,
δZ
.
Changev
)
δZTC
,
δtopsByRoot
:=
δZConnectTracked
(
δZ
.
Changev
,
δBtail
.
trackIdx
)
δZTC
,
δtopsByRoot
:=
δZConnectTracked
(
δZ
.
Changev
,
δBtail
.
trackIdx
)
δB
:=
ΔB
{
Rev
:
δZ
.
Tid
,
ByRoot
:
make
(
map
[
zodb
.
Oid
]
map
[
Key
]
ΔValue
)}
δB
:=
ΔB
{
Rev
:
δZ
.
Tid
,
ByRoot
:
make
(
map
[
zodb
.
Oid
]
map
[
Key
]
ΔValue
)}
...
@@ -789,7 +791,8 @@ func (δBtail *ΔBtail) Update(δZ *zodb.EventCommit) (_ ΔB, err error) {
...
@@ -789,7 +791,8 @@ func (δBtail *ΔBtail) Update(δZ *zodb.EventCommit) (_ ΔB, err error) {
// this root was not tracked before -> create δTtail for it with empty changes
// this root was not tracked before -> create δTtail for it with empty changes
// XXX do not keep entries with empty δkv ?
// XXX do not keep entries with empty δkv ?
var
vδT
[]
ΔTree
var
vδT
[]
ΔTree
for
_
,
δZj
:=
range
δBtail
.
δZtail
.
Data
()
{
vδZ
:=
δBtail
.
δZtail
.
Data
()
for
_
,
δZj
:=
range
vδZ
[
:
len
(
vδZ
)
-
1
]
{
vδT
=
append
(
vδT
,
ΔTree
{
Rev
:
δZj
.
Rev
,
ΔKV
:
make
(
map
[
Key
]
ΔValue
)})
vδT
=
append
(
vδT
,
ΔTree
{
Rev
:
δZj
.
Rev
,
ΔKV
:
make
(
map
[
Key
]
ΔValue
)})
}
}
δTtail
=
&
ΔTtail
{
δTtail
=
&
ΔTtail
{
...
@@ -807,7 +810,6 @@ func (δBtail *ΔBtail) Update(δZ *zodb.EventCommit) (_ ΔB, err error) {
...
@@ -807,7 +810,6 @@ func (δBtail *ΔBtail) Update(δZ *zodb.EventCommit) (_ ΔB, err error) {
}
}
}
}
δBtail
.
δZtail
.
Append
(
δZ
.
Tid
,
δZ
.
Changev
)
return
δB
,
nil
return
δB
,
nil
}
}
...
...
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