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
e88afbd4
Commit
e88afbd4
authored
Jun 06, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
ffaad0a6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
6 deletions
+5
-6
wcfs/δbtail.go
wcfs/δbtail.go
+4
-5
wcfs/δftail.go
wcfs/δftail.go
+1
-1
No files found.
wcfs/δbtail.go
View file @
e88afbd4
...
...
@@ -104,8 +104,7 @@ type ΔBtail struct {
// ΔB represents a change in BTrees space.
type
ΔB
struct
{
Rev
zodb
.
Tid
// XXX -> ByRoot?
Change
map
[
*
Tree
]
map
[
Key
]
Value
// {} root -> {}(key, value)
ByRoot
map
[
*
Tree
]
map
[
Key
]
Value
// {} root -> {}(key, value)
}
// ΔRoots describes which BTrees were change in one revision.
...
...
@@ -224,13 +223,13 @@ func (δBtail *ΔBtail) Update(δZ *zodb.EventCommit) ΔB {
}
}
δB
:=
ΔB
{
Rev
:
δZ
.
Tid
,
Change
:
make
(
map
[
*
Tree
]
map
[
Key
]
Value
)}
δB
:=
ΔB
{
Rev
:
δZ
.
Tid
,
ByRoot
:
make
(
map
[
*
Tree
]
map
[
Key
]
Value
)}
for
root
:=
range
δZByRoot
{
δt
,
ok
:=
δB
.
Change
[
root
]
δt
,
ok
:=
δB
.
ByRoot
[
root
]
if
!
ok
{
δt
=
make
(
map
[
Key
]
Value
)
δB
.
Change
[
root
]
=
δt
δB
.
ByRoot
[
root
]
=
δt
}
// XXX stub to get file.size invalidation working
// TODO update δt
...
...
wcfs/δftail.go
View file @
e88afbd4
...
...
@@ -192,7 +192,7 @@ func (δFtail *ΔFtail) Update(δZ *zodb.EventCommit, zhead *ZConn) ΔF {
δF
:=
ΔF
{
Rev
:
δB
.
Rev
,
ByFile
:
make
(
map
[
*
BigFile
]
*
ΔFile
)}
// take btree changes into account
for
root
,
δt
:=
range
δB
.
Change
{
for
root
,
δt
:=
range
δB
.
ByRoot
{
files
:=
δFtail
.
fileIdx
[
root
]
if
len
(
files
)
==
0
{
panicf
(
"ΔFtail: root<%s> -> ø file"
,
root
.
POid
())
...
...
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