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
b81173f3
Commit
b81173f3
authored
Jul 09, 2021
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
X fix
parent
46340069
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
0 deletions
+10
-0
wcfs/internal/zdata/δftail.go
wcfs/internal/zdata/δftail.go
+8
-0
wcfs/internal/zdata/δftail_test.go
wcfs/internal/zdata/δftail_test.go
+2
-0
No files found.
wcfs/internal/zdata/δftail.go
View file @
b81173f3
...
...
@@ -238,7 +238,9 @@ func (δFtail *ΔFtail) Update(δZ *zodb.EventCommit) (_ ΔF, err error) {
δF
:=
ΔF
{
Rev
:
δB
.
Rev
,
ByFile
:
make
(
map
[
zodb
.
Oid
]
*
ΔFile
)}
// take btree changes into account
// fmt.Printf("δB.ΔByRoot: %v\n", δB.ΔByRoot)
for
root
,
δt
:=
range
δB
.
ΔByRoot
{
// fmt.Printf("root: %v δt: %v\n", root, δt)
files
:=
δFtail
.
fileIdx
[
root
]
if
len
(
files
)
==
0
{
panicf
(
"BUG: ΔFtail: root<%s> -> ø files"
,
root
)
...
...
@@ -307,6 +309,10 @@ func (δFtail *ΔFtail) Update(δZ *zodb.EventCommit) (_ ΔF, err error) {
}
for
root
,
inblk
:=
range
zt
.
inroot
{
if
len
(
inblk
)
==
0
{
continue
}
// fmt.Printf("root: %v inblk: %v\n", root, inblk)
files
:=
δFtail
.
fileIdx
[
root
]
for
file
:=
range
files
{
δfile
,
ok
:=
δF
.
ByFile
[
file
]
...
...
@@ -320,6 +326,8 @@ func (δFtail *ΔFtail) Update(δZ *zodb.EventCommit) (_ ΔF, err error) {
}
}
// fmt.Printf("-> δF: %v\n", δF)
δFtail
.
vδF
=
append
(
δFtail
.
vδF
,
δF
)
return
δF
,
nil
}
...
...
wcfs/internal/zdata/δftail_test.go
View file @
b81173f3
...
...
@@ -175,6 +175,8 @@ func testΔFtail(t_ *testing.T, testq chan ΔFTestEntry) {
xat
[
commit
.
At
]
=
fmt
.
Sprintf
(
"at%d"
,
i
)
t
.
Logf
(
"# → @%s (%s) δT%s δD%s
\t
; %s"
,
xat
[
commit
.
At
],
commit
.
At
,
xbtreetest
.
KVTxt
(
test
.
δblkTab
),
test
.
δdataTab
,
tTxt
)
// fmt.Printf("Zinblk: %v\n", Zinblk)
// update δftail
δF
,
err
:=
δftail
.
Update
(
commit
.
ΔZ
);
X
(
err
)
...
...
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