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
d24d23a7
Commit
d24d23a7
authored
May 11, 2021
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
f81aa6f8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
5 deletions
+10
-5
wcfs/δbtail.go
wcfs/δbtail.go
+10
-5
No files found.
wcfs/δbtail.go
View file @
d24d23a7
...
@@ -689,9 +689,10 @@ func (δBtail *ΔBtail) rebuild() (err error) {
...
@@ -689,9 +689,10 @@ func (δBtail *ΔBtail) rebuild() (err error) {
δTtail
,
ok
:=
δBtail
.
byRoot
[
root
]
δTtail
,
ok
:=
δBtail
.
byRoot
[
root
]
if
!
ok
{
if
!
ok
{
// 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 ?
var
vδT
[]
ΔTree
var
vδT
[]
ΔTree
for
j
:=
0
;
j
<
len
(
vδZ
);
j
++
{
for
_
,
δZj
:=
range
vδZ
{
vδT
=
append
(
vδT
,
ΔTree
{
Rev
:
vδZ
[
j
]
.
Rev
,
ΔKV
:
make
(
map
[
Key
]
ΔValue
)})
vδT
=
append
(
vδT
,
ΔTree
{
Rev
:
δZj
.
Rev
,
ΔKV
:
make
(
map
[
Key
]
ΔValue
)})
}
}
δTtail
=
&
ΔTtail
{
δTtail
=
&
ΔTtail
{
vδT
:
vδT
,
vδT
:
vδT
,
...
@@ -745,8 +746,6 @@ func (δBtail *ΔBtail) Update(δZ *zodb.EventCommit) (_ ΔB, err error) {
...
@@ -745,8 +746,6 @@ 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
()
δBtail
.
δZtail
.
Append
(
δZ
.
Tid
,
δZ
.
Changev
)
tracef
(
"Update δZ: %v
\n
"
,
δZ
.
Changev
)
tracef
(
"Update δZ: %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
)
...
@@ -787,7 +786,12 @@ func (δBtail *ΔBtail) Update(δZ *zodb.EventCommit) (_ ΔB, err error) {
...
@@ -787,7 +786,12 @@ func (δBtail *ΔBtail) Update(δZ *zodb.EventCommit) (_ ΔB, err error) {
δB
.
ByRoot
[
root
]
=
δT
δB
.
ByRoot
[
root
]
=
δT
δTtail
,
ok
:=
δBtail
.
byRoot
[
root
]
δTtail
,
ok
:=
δBtail
.
byRoot
[
root
]
if
!
ok
{
if
!
ok
{
// this root was not tracked before ... XXX
// this root was not tracked before -> create δTtail for it with empty changes
// XXX do not keep entries with empty δkv ?
var
vδT
[]
ΔTree
for
_
,
δZj
:=
range
δBtail
.
δZtail
.
Data
()
{
vδT
=
append
(
vδT
,
ΔTree
{
Rev
:
δZj
.
Rev
,
ΔKV
:
make
(
map
[
Key
]
ΔValue
)})
}
δTtail
=
&
ΔTtail
{
δTtail
=
&
ΔTtail
{
// XXX vδT: ...
// XXX vδT: ...
// XXX KVAtTail: ...,
// XXX KVAtTail: ...,
...
@@ -803,6 +807,7 @@ func (δBtail *ΔBtail) Update(δZ *zodb.EventCommit) (_ ΔB, err error) {
...
@@ -803,6 +807,7 @@ 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