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
66c5b4d4
Commit
66c5b4d4
authored
Jun 06, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
0d366d6e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
9 deletions
+6
-9
wcfs/wcfs_test.py
wcfs/wcfs_test.py
+2
-4
wcfs/δbtail.go
wcfs/δbtail.go
+4
-5
No files found.
wcfs/wcfs_test.py
View file @
66c5b4d4
...
...
@@ -878,12 +878,10 @@ def test_wcfs():
# >>> (@at3) commit again without changing zf size XXX write about b cache inval
f2
=
t
.
open
(
zf
,
at
=
at2
)
# t.change(zf, {2: '3c'})
t
.
change
(
zf
,
{
1
:
'3b'
,
2
:
'3c'
})
t
.
change
(
zf
,
{
2
:
'3c'
})
# FIXME + 3b after δbtree works (hole -> zblk)
at3
=
t
.
commit
()
# f.assertCache([1,1,0,1]) # XXX b must be uncached
f
.
assertCache
([
1
,
0
,
0
,
1
])
f
.
assertCache
([
1
,
1
,
0
,
1
])
# FIXME b must be invalidated (see 3b ^^^)
# f @head is opened again -> cache must not be lost
f_
=
t
.
open
(
zf
)
...
...
wcfs/δbtail.go
View file @
66c5b4d4
...
...
@@ -129,7 +129,6 @@ type ΔTtail struct {
// ΔTree describes changes to one BTree in one revision.
type
ΔTree
struct
{
Rev
zodb
.
Tid
// Root *Tree // XXX ok to have here?
KV
map
[
Key
]
Value
}
...
...
@@ -162,7 +161,7 @@ func (δBtail *ΔBtail) Tail() zodb.Tid { return δBtail.δZtail.Tail() }
// Track adds tree path to tracked set.
//
// path[0] signifies
a
root.
// path[0] signifies
tree
root.
// All path elemens must be Tree except last one which must be Bucket.
//
// XXX δBtail is rebuild to also include keys corresponding to added nodes.
...
...
@@ -211,13 +210,13 @@ func (δBtail *ΔBtail) Update(δZ *zodb.EventCommit) ΔB {
// {} root -> []oid changed under that root in tracked set
δZByRoot
:=
map
[
*
Tree
][]
zodb
.
Oid
{}
// XXX -> map[*Tree]SetOid ?
for
_
,
δ
:=
range
δZ
.
Changev
{
roots
,
ok
:=
δBtail
.
trackIdx
[
δ
]
for
_
,
oid
:=
range
δZ
.
Changev
{
roots
,
ok
:=
δBtail
.
trackIdx
[
oid
]
if
!
ok
{
continue
}
for
root
:=
range
roots
{
δZByRoot
[
root
]
=
append
(
δZByRoot
[
root
],
δ
)
δZByRoot
[
root
]
=
append
(
δZByRoot
[
root
],
oid
)
}
}
...
...
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