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
340f7659
Commit
340f7659
authored
Apr 03, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
6174e198
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
2 deletions
+28
-2
wcfs/internal/xbtree/δbtail.go
wcfs/internal/xbtree/δbtail.go
+28
-2
No files found.
wcfs/internal/xbtree/δbtail.go
View file @
340f7659
...
@@ -49,9 +49,11 @@ type Key = int64
...
@@ -49,9 +49,11 @@ type Key = int64
//
//
// XXX incremental; not full coverage
// XXX incremental; not full coverage
// XXX concurrency safety
// XXX concurrency safety
//
// XXX see also zodb.ΔTail .
type
ΔTail
struct
{
type
ΔTail
struct
{
//at // = head
δBtail
[]
ΔRevEntry
// BTree changes; Covers keys ∈ tracket subset
δZtail
*
zodb
.
ΔTail
δZtail
*
zodb
.
ΔTail
// raw ZODB changes; Kept to rebuild δBtail after new Track
// XXX or ask client provide db on every call?
// XXX or ask client provide db on every call?
db
*
zodb
.
DB
// to open connections to load new/old tree|buckets
db
*
zodb
.
DB
// to open connections to load new/old tree|buckets
...
@@ -73,6 +75,30 @@ type ΔTree struct {
...
@@ -73,6 +75,30 @@ type ΔTree struct {
Keyv
[]
Key
Keyv
[]
Key
}
}
// NewΔTail creats new ΔTail object.
//
// Initial tracked set is empty.
// Initial coverage is (at₀, at₀].
func
NewΔTail
(
at0
zodb
.
Tid
)
*
ΔTail
{
return
&
ΔTail
{
δZtail
:
zodb
.
NewΔTail
(
at0
),
root
:
make
(
map
[
zodb
.
Oid
]
SetTree
),
}
}
// Head is similar to zodb.ΔTail.Head . XXX ok?
func
(
δb
*
ΔTail
)
Head
()
zodb
.
Tid
{
return
δb
.
δZtail
.
Head
()
}
// Tail is similar to zodb.ΔTail.Tail . XXX ok?
func
(
δb
*
ΔTail
)
Tail
()
zodb
.
Tid
{
return
δb
.
δZtail
.
Tail
()
}
// XXX SliceByRev?
// XXX ForgetPast
// Track adds tree path to tracked set.
// Track adds tree path to tracked set.
//
//
// XXX tailv is rebuild to also include keys corresponding to added nodes.
// XXX tailv is rebuild to also include keys corresponding to added nodes.
...
...
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