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
943dfc75
Commit
943dfc75
authored
Apr 22, 2021
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
004ca7c4
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
10 deletions
+6
-10
wcfs/δbtail.go
wcfs/δbtail.go
+3
-4
wcfs/δbtail_test.go
wcfs/δbtail_test.go
+1
-2
wcfs/δftail.go
wcfs/δftail.go
+2
-4
No files found.
wcfs/δbtail.go
View file @
943dfc75
...
@@ -1338,6 +1338,7 @@ func xidOf(obj zodb.IPersistent) string {
...
@@ -1338,6 +1338,7 @@ func xidOf(obj zodb.IPersistent) string {
func
(
δBtail
*
ΔBtail
)
ForgetPast
(
revCut
zodb
.
Tid
)
{
func
(
δBtail
*
ΔBtail
)
ForgetPast
(
revCut
zodb
.
Tid
)
{
δBtail
.
δZtail
.
ForgetPast
(
revCut
)
// XXX stub
δBtail
.
δZtail
.
ForgetPast
(
revCut
)
// XXX stub
// XXX clean vδT
}
}
...
@@ -1394,7 +1395,7 @@ func (δBtail *ΔBtail) Get(ctx context.Context, root *Tree, key Key, at zodb.Ti
...
@@ -1394,7 +1395,7 @@ func (δBtail *ΔBtail) Get(ctx context.Context, root *Tree, key Key, at zodb.Ti
// either use @tail[key], if it is present, or @head[key]
// either use @tail[key], if it is present, or @head[key]
rev
=
δBtail
.
Tail
()
rev
=
δBtail
.
Tail
()
revExact
=
false
revExact
=
false
value
,
ok
=
δTtail
.
KVAtTail
[
key
]
value
,
ok
=
δTtail
.
KVAtTail
[
key
]
// XXX kill - just use δvalue.Old from next-to-at entry
if
ok
{
if
ok
{
return
return
}
}
...
@@ -1414,10 +1415,9 @@ func (δBtail *ΔBtail) Get(ctx context.Context, root *Tree, key Key, at zodb.Ti
...
@@ -1414,10 +1415,9 @@ func (δBtail *ΔBtail) Get(ctx context.Context, root *Tree, key Key, at zodb.Ti
return
return
}
}
// XXX
// XXX
don't need
func
(
δBtail
*
ΔBtail
)
SliceByRev
(
lo
,
hi
zodb
.
Tid
)
/*readonly*/
[]
ΔB
{
func
(
δBtail
*
ΔBtail
)
SliceByRev
(
lo
,
hi
zodb
.
Tid
)
/*readonly*/
[]
ΔB
{
δassertSlice
(
δBtail
,
lo
,
hi
)
δassertSlice
(
δBtail
,
lo
,
hi
)
panic
(
"TODO"
)
panic
(
"TODO"
)
}
}
...
@@ -1432,7 +1432,6 @@ func (δBtail *ΔBtail) SliceByRev(lo, hi zodb.Tid) /*readonly*/ []ΔB {
...
@@ -1432,7 +1432,6 @@ func (δBtail *ΔBtail) SliceByRev(lo, hi zodb.Tid) /*readonly*/ []ΔB {
// Note: contrary to regular go slicing, low is exclusive while high is inclusive.
// Note: contrary to regular go slicing, low is exclusive while high is inclusive.
func
(
δBtail
*
ΔBtail
)
SliceByRootRev
(
root
*
Tree
,
lo
,
hi
zodb
.
Tid
)
/*readonly*/
[]
ΔTree
{
func
(
δBtail
*
ΔBtail
)
SliceByRootRev
(
root
*
Tree
,
lo
,
hi
zodb
.
Tid
)
/*readonly*/
[]
ΔTree
{
δassertSlice
(
δBtail
,
lo
,
hi
)
δassertSlice
(
δBtail
,
lo
,
hi
)
panic
(
"TODO"
)
panic
(
"TODO"
)
}
}
...
...
wcfs/δbtail_test.go
View file @
943dfc75
...
@@ -601,7 +601,6 @@ func xverifyΔBTail(t *testing.T, subj string, db *zodb.DB, treeRoot zodb.Oid, a
...
@@ -601,7 +601,6 @@ func xverifyΔBTail(t *testing.T, subj string, db *zodb.DB, treeRoot zodb.Oid, a
// xverifyΔBTail1 verifies how ΔBTail handles ZODB update at1->at2 from initial
// xverifyΔBTail1 verifies how ΔBTail handles ZODB update at1->at2 from initial
// tracked state defined by initialTrackedKeys.
// tracked state defined by initialTrackedKeys.
// XXX initialTrackedKeys -> tracked1 ?
func
xverifyΔBTail1
(
t
*
testing
.
T
,
subj
string
,
db
*
zodb
.
DB
,
treeRoot
zodb
.
Oid
,
at1
,
at2
zodb
.
Tid
,
xkv1
,
xkv2
RBucketSet
,
δZ
*
zodb
.
EventCommit
,
initialTrackedKeys
SetKey
,
kadj
map
[
Key
]
SetKey
)
{
func
xverifyΔBTail1
(
t
*
testing
.
T
,
subj
string
,
db
*
zodb
.
DB
,
treeRoot
zodb
.
Oid
,
at1
,
at2
zodb
.
Tid
,
xkv1
,
xkv2
RBucketSet
,
δZ
*
zodb
.
EventCommit
,
initialTrackedKeys
SetKey
,
kadj
map
[
Key
]
SetKey
)
{
X
:=
exc
.
Raiseif
X
:=
exc
.
Raiseif
tracef
(
"
\n
>>> Track=%s
\n
"
,
initialTrackedKeys
)
tracef
(
"
\n
>>> Track=%s
\n
"
,
initialTrackedKeys
)
...
@@ -853,7 +852,7 @@ func testΔBTail(t *testing.T, testq chan ΔBTestEntry) {
...
@@ -853,7 +852,7 @@ func testΔBTail(t *testing.T, testq chan ΔBTestEntry) {
tracef
(
"
\n\n\n
**** %s ****
\n\n
"
,
subj
)
tracef
(
"
\n\n\n
**** %s ****
\n\n
"
,
subj
)
xverifyΔBTail
(
t
,
subj
,
db
,
tg
.
treeRoot
,
at1
,
at2
,
xkv1
,
xkv2
,
δZ
,
test
.
kadjOK
)
xverifyΔBTail
(
t
,
subj
,
db
,
tg
.
treeRoot
,
at1
,
at2
,
xkv1
,
xkv2
,
δZ
,
test
.
kadjOK
)
// XXX also verify ΔBtail.Get +
...
// XXX also verify ΔBtail.Get +
SliceByRootRev
at1
=
at2
at1
=
at2
xkv1
=
xkv2
xkv1
=
xkv2
...
...
wcfs/δftail.go
View file @
943dfc75
...
@@ -343,14 +343,12 @@ func (δFtail *ΔFtail) update(file *BigFile) {
...
@@ -343,14 +343,12 @@ func (δFtail *ΔFtail) update(file *BigFile) {
// ForgetPast discards all δFtail entries with rev ≤ revCut.
// ForgetPast discards all δFtail entries with rev ≤ revCut.
func
(
δFtail
*
ΔFtail
)
ForgetPast
(
revCut
zodb
.
Tid
)
{
func
(
δFtail
*
ΔFtail
)
ForgetPast
(
revCut
zodb
.
Tid
)
{
panic
(
"TODO"
)
δFtail
.
δBtail
.
ForgetPast
(
revCut
)
// XXX -> .δBtail.ForgetPast(recCut)
}
}
// XXX don't need
// XXX don't need
func
(
δFtail
*
ΔFtail
)
SliceByRev
(
lo
,
hi
zodb
.
Tid
)
/*readonly*/
[]
ΔF
{
func
(
δFtail
*
ΔFtail
)
SliceByRev
(
lo
,
hi
zodb
.
Tid
)
/*readonly*/
[]
ΔF
{
δassertSlice
(
δFtail
,
lo
,
hi
)
δassertSlice
(
δFtail
,
lo
,
hi
)
panic
(
"TODO"
)
panic
(
"TODO"
)
}
}
...
@@ -367,7 +365,7 @@ func (δFtail *ΔFtail) SliceByFileRev(file *BigFile, lo, hi zodb.Tid) /*readonl
...
@@ -367,7 +365,7 @@ func (δFtail *ΔFtail) SliceByFileRev(file *BigFile, lo, hi zodb.Tid) /*readonl
δassertSlice
(
δFtail
,
lo
,
hi
)
δassertSlice
(
δFtail
,
lo
,
hi
)
// FIXME rework to just query .δBtail.SliceByRootRev(file.blktab, lo, hi) +
// FIXME rework to just query .δBtail.SliceByRootRev(file.blktab, lo, hi) +
// merge δZBlk history
i
with that.
// merge δZBlk history with that.
// XXX locking?
// XXX locking?
δFtail
.
update
(
file
)
δFtail
.
update
(
file
)
...
...
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