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
5aac8b0d
Commit
5aac8b0d
authored
Jun 13, 2021
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
d99b1b41
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
3 deletions
+16
-3
wcfs/internal/xbtree/δbtail.go
wcfs/internal/xbtree/δbtail.go
+16
-3
No files found.
wcfs/internal/xbtree/δbtail.go
View file @
5aac8b0d
...
...
@@ -93,7 +93,8 @@ type ΔBtail struct {
// includes all changed objects, not only tracked ones.
δZtail
*
zodb
.
ΔTail
byRoot
map
[
zodb
.
Oid
]
*
ΔTtail
// {} root -> [] k/v change history; only for keys ∈ tracked subset
vδBroots
[]
ΔBroots
// [] (rev, roots changed in this rev)
byRoot
map
[
zodb
.
Oid
]
*
ΔTtail
// {} root -> [] k/v change history; only for keys ∈ tracked subset XXX -> vδByRoot ?
// handle to make connections to access database.
// TODO allow client to optionally provide zconnOld/zconnNew on e.g. Update()
...
...
@@ -127,11 +128,18 @@ type ΔTtail struct {
lastRevOf
map
[
Key
]
zodb
.
Tid
// {} key -> last
}
// ΔBroots represents roots-only part of ΔB - a change in BTrees space.
//
// It describes which trees were changed, but does not provide δkv details for changed trees.
type
ΔBroots
struct
{
Rev
zodb
.
Tid
ΔRoots
SetOid
// which roots changed in this revision
}
// ΔB represents a change in BTrees space.
type
ΔB
struct
{
Rev
zodb
.
Tid
ByRoot
map
[
zodb
.
Oid
]
map
[
Key
]
ΔValue
// {} root -> {}(key, δvalue)
ByRoot
map
[
zodb
.
Oid
]
map
[
Key
]
ΔValue
// {} root -> {}(key, δvalue)
XXX -> ΔByRoot ?
}
// ΔTree describes changes to one BTree in one revision.
...
...
@@ -207,7 +215,12 @@ func (δBtail *ΔBtail) Head() zodb.Tid { return δBtail.δZtail.Head() }
func
(
δBtail
*
ΔBtail
)
Tail
()
zodb
.
Tid
{
return
δBtail
.
δZtail
.
Tail
()
}
// XXX SliceByRev?
// XXX ForgetPast
// ForgetPast XXX
func
(
δBtail
*
ΔBtail
)
ForgetPast
(
revCut
zodb
.
Tid
)
{
// TODO go throough vδBroots till revcut -> find which trees to trim -> trim ΔTtails.
panic
(
"TODO"
)
}
// Track adds tree path to tracked set.
//
...
...
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