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
d9842e52
Commit
d9842e52
authored
Sep 01, 2020
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
8adc4356
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
20 deletions
+1
-20
wcfs/δbtail.go
wcfs/δbtail.go
+1
-13
wcfs/δbtail_test.go
wcfs/δbtail_test.go
+0
-7
No files found.
wcfs/δbtail.go
View file @
d9842e52
...
@@ -294,19 +294,7 @@ func (δBtail *ΔBtail) Tail() zodb.Tid { return δBtail.δZtail.Tail() }
...
@@ -294,19 +294,7 @@ func (δBtail *ΔBtail) Tail() zodb.Tid { return δBtail.δZtail.Tail() }
// XXX path -> []oid ?
// XXX path -> []oid ?
//
//
// XXX catch cycles on add?
// XXX catch cycles on add?
/*
func
(
δBtail
*
ΔBtail
)
Track
(
key
Key
,
keyPresent
bool
,
path
[]
Node
)
error
{
// XXX Tree|Bucket; path[0] = root
type TrackFlags int
const (
// TrackMaxKey
// - indicates that provided path is currently the rightmost arm of the tree, and
// - requests that changes to max key of the tree to be covered by δBtail from now on.
TrackMaxKey TrackFlags = 1 << iota
// XXX TrackMinKey (we don't need it in WCFS)
)
*/
//func (δBtail *ΔBtail) Track(key Key, keyPresent bool, path []Node, flags TrackFlags) error { // XXX Tree|Bucket; path[0] = root
func
(
δBtail
*
ΔBtail
)
Track
(
key
Key
,
keyPresent
bool
,
path
[]
Node
)
error
{
// XXX Tree|Bucket; path[0] = root
l
:=
len
(
path
)
l
:=
len
(
path
)
if
l
==
0
{
if
l
==
0
{
panic
(
"empty path"
)
panic
(
"empty path"
)
...
...
wcfs/δbtail_test.go
View file @
d9842e52
...
@@ -561,8 +561,6 @@ func xverifyΔBTail1(t *testing.T, subj string, db *zodb.DB, treeRoot zodb.Oid,
...
@@ -561,8 +561,6 @@ func xverifyΔBTail1(t *testing.T, subj string, db *zodb.DB, treeRoot zodb.Oid,
path
=
append
(
path
,
node
)
path
=
append
(
path
,
node
)
});
X
(
err
)
});
X
(
err
)
// kInf imitates ZBigFile.Size() request, which enables maxkey tracking.
// XXX ^^^ comment place = ?
err
=
δbtail
.
Track
(
k
,
ok
,
path
);
X
(
err
)
err
=
δbtail
.
Track
(
k
,
ok
,
path
);
X
(
err
)
kadjTracked
.
Update
(
kadj
[
k
])
kadjTracked
.
Update
(
kadj
[
k
])
...
@@ -596,19 +594,14 @@ func xverifyΔBTail1(t *testing.T, subj string, db *zodb.DB, treeRoot zodb.Oid,
...
@@ -596,19 +594,14 @@ func xverifyΔBTail1(t *testing.T, subj string, db *zodb.DB, treeRoot zodb.Oid,
// holes1 = tracked1 \ kv1
// holes1 = tracked1 \ kv1
holes1
:=
SetKey
{}
holes1
:=
SetKey
{}
for
k
:=
range
initialTrackedKeys
{
for
k
:=
range
initialTrackedKeys
{
if
k
==
kInf
{
continue
// ∞ is translated to maxk1 XXX
}
_
,
keyin1
:=
xkv1
.
Get
(
k
)
.
kv
[
k
]
_
,
keyin1
:=
xkv1
.
Get
(
k
)
.
kv
[
k
]
if
!
keyin1
{
if
!
keyin1
{
holes1
.
Add
(
k
)
holes1
.
Add
(
k
)
}
}
}
}
/*
if
!
reflect
.
DeepEqual
(
holes1
,
δbtail
.
holeIdx
.
SetKey
)
{
if
!
reflect
.
DeepEqual
(
holes1
,
δbtail
.
holeIdx
.
SetKey
)
{
badf
(
"δbtail.holeIdx1 wrong ; holeIdx=%v holeIdxOK=%v"
,
δbtail
.
holeIdx
,
holes1
)
badf
(
"δbtail.holeIdx1 wrong ; holeIdx=%v holeIdxOK=%v"
,
δbtail
.
holeIdx
,
holes1
)
}
}
*/
// XXX verify δbtail holeIdx against @at1
// XXX verify δbtail holeIdx against @at1
...
...
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