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
873e336e
Commit
873e336e
authored
Apr 17, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
c319d650
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
wcfs/internal/xbtree/δbtail.go
wcfs/internal/xbtree/δbtail.go
+3
-3
No files found.
wcfs/internal/xbtree/δbtail.go
View file @
873e336e
...
...
@@ -264,14 +264,14 @@ func (btail *ΔTail) ForgetPast(revCut zodb.Tid) {
//
// XXX at must ∈ (tail, head] XXX [tail ?
// XXX key must be tracked
func
(
b
tail
*
ΔTail
)
Get
(
root
*
Tree
,
key
Key
,
at
zodb
.
Tid
)
(
value
Value
,
ok
bool
,
rev
zodb
.
Tid
,
revExact
bool
)
{
func
(
δΒ
tail
*
ΔTail
)
Get
(
root
*
Tree
,
key
Key
,
at
zodb
.
Tid
)
(
value
Value
,
ok
bool
,
rev
zodb
.
Tid
,
revExact
bool
)
{
// XXX key not tracked -> panic
// XXX at not ∈ (tail, head] -> panic
// XXX stub -> that only ZBlk.rev is used
// XXX -> index lastXXXOf(key) | linear scan ↓ looking for change <= at
δt
:=
b
tail
.
byRoot
[
root
]
δt
:=
δΒ
tail
.
byRoot
[
root
]
for
i
:=
len
(
δt
.
δTtail
)
-
1
;
i
>=
0
;
i
--
{
δ
:=
δt
.
δTtail
[
i
]
if
at
<
δ
.
Rev
{
...
...
@@ -292,7 +292,7 @@ func (btail *ΔTail) Get(root *Tree, key Key, at zodb.Tid) (value Value, ok bool
// key not in history tail
value
,
ok
=
δt
.
KVAtTail
[
key
]
rev
=
b
tail
.
Tail
()
rev
=
δΒ
tail
.
Tail
()
revExact
=
false
return
}
...
...
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