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
c5969bd9
Commit
c5969bd9
authored
Jun 24, 2020
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
c2d31c88
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
wcfs/δbtail.go
wcfs/δbtail.go
+7
-2
No files found.
wcfs/δbtail.go
View file @
c5969bd9
...
@@ -289,10 +289,12 @@ func (δBtail *ΔBtail) Track(ctx context.Context, key Key, keyPresent bool, pat
...
@@ -289,10 +289,12 @@ func (δBtail *ΔBtail) Track(ctx context.Context, key Key, keyPresent bool, pat
panic
(
"empty path"
)
panic
(
"empty path"
)
}
}
treeRoot
:=
path
[
0
]
.
(
*
Tree
)
treeRoot
:=
path
[
0
]
.
(
*
Tree
)
/*
var leafBucket *Bucket
var leafBucket *Bucket
if l := len(path); l > 1 {
if l := len(path); l > 1 {
leafBucket = path[l-1].(*Bucket)
leafBucket = path[l-1].(*Bucket)
}
}
*/
// XXX assert Tree Tree ... Tree Bucket
// XXX assert Tree Tree ... Tree Bucket
root
:=
treeRoot
.
POid
()
root
:=
treeRoot
.
POid
()
...
@@ -309,7 +311,7 @@ func (δBtail *ΔBtail) Track(ctx context.Context, key Key, keyPresent bool, pat
...
@@ -309,7 +311,7 @@ func (δBtail *ΔBtail) Track(ctx context.Context, key Key, keyPresent bool, pat
// XXX check for InvalidOid (e.g. T/B1:a with bucket not having its own oid.
// XXX check for InvalidOid (e.g. T/B1:a with bucket not having its own oid.
track
,
oldTrack
=
δBtail
.
trackIdx
[
oid
]
track
,
oldTrack
=
δBtail
.
trackIdx
[
oid
]
if
!
oldTrack
{
if
!
oldTrack
{
track
=
nodeTrack
{
parent
:
parent
,
holes
:
SetKey
{}}
track
=
nodeTrack
{
parent
:
parent
,
holes
:
SetKey
{}}
δBtail
.
trackIdx
[
oid
]
=
track
δBtail
.
trackIdx
[
oid
]
=
track
// XXX .trackNew += oid
// XXX .trackNew += oid
}
}
...
@@ -321,8 +323,10 @@ func (δBtail *ΔBtail) Track(ctx context.Context, key Key, keyPresent bool, pat
...
@@ -321,8 +323,10 @@ func (δBtail *ΔBtail) Track(ctx context.Context, key Key, keyPresent bool, pat
parent
=
oid
parent
=
oid
}
}
// remember
tracked holes in trackIdx
// remember
missing keys in track of leaf node (bucket or top-level ø tree)
if
!
keyPresent
{
if
!
keyPresent
{
track
.
holes
.
Add
(
key
)
/*
if leafBucket != nil {
if leafBucket != nil {
track.holes.Add(key)
track.holes.Add(key)
} else {
} else {
...
@@ -330,6 +334,7 @@ func (δBtail *ΔBtail) Track(ctx context.Context, key Key, keyPresent bool, pat
...
@@ -330,6 +334,7 @@ func (δBtail *ΔBtail) Track(ctx context.Context, key Key, keyPresent bool, pat
rootTrack := δBtail.trackIdx[root] // must succeed
rootTrack := δBtail.trackIdx[root] // must succeed
rootTrack.holes.Add(key)
rootTrack.holes.Add(key)
}
}
*/
}
}
/* XXX kill
/* XXX kill
...
...
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