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
074e3472
Commit
074e3472
authored
Jun 30, 2021
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
ab6fe700
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
9 deletions
+9
-9
wcfs/internal/xbtree/δbtail.go
wcfs/internal/xbtree/δbtail.go
+1
-2
wcfs/internal/zdata/zblk.go
wcfs/internal/zdata/zblk.go
+1
-1
wcfs/internal/zdata/zblk_test.go
wcfs/internal/zdata/zblk_test.go
+0
-2
wcfs/internal/zdata/δftail.go
wcfs/internal/zdata/δftail.go
+7
-4
No files found.
wcfs/internal/xbtree/δbtail.go
View file @
074e3472
...
@@ -236,8 +236,6 @@ func (orig *ΔTtail) Clone() *ΔTtail {
...
@@ -236,8 +236,6 @@ func (orig *ΔTtail) Clone() *ΔTtail {
func
(
δBtail
*
ΔBtail
)
Head
()
zodb
.
Tid
{
return
δBtail
.
δZtail
.
Head
()
}
func
(
δBtail
*
ΔBtail
)
Head
()
zodb
.
Tid
{
return
δBtail
.
δZtail
.
Head
()
}
func
(
δBtail
*
ΔBtail
)
Tail
()
zodb
.
Tid
{
return
δBtail
.
δZtail
.
Tail
()
}
func
(
δBtail
*
ΔBtail
)
Tail
()
zodb
.
Tid
{
return
δBtail
.
δZtail
.
Tail
()
}
// XXX SliceByRev?
// Track adds tree path to tracked set.
// Track adds tree path to tracked set.
//
//
// path[0] signifies tree root.
// path[0] signifies tree root.
...
@@ -253,6 +251,7 @@ func (δBtail *ΔBtail) Tail() zodb.Tid { return δBtail.δZtail.Tail() }
...
@@ -253,6 +251,7 @@ func (δBtail *ΔBtail) Tail() zodb.Tid { return δBtail.δZtail.Tail() }
//
//
// XXX catch cycles on add?
// XXX catch cycles on add?
// XXX no need to pass in key? (-> all keys, covered by leaf keyrange, will be added to tracking set of keys)
// XXX no need to pass in key? (-> all keys, covered by leaf keyrange, will be added to tracking set of keys)
// XXX no need to return error?
func
(
δBtail
*
ΔBtail
)
Track
(
key
Key
,
nodePath
[]
Node
)
error
{
// XXX Tree|Bucket; path[0] = root
func
(
δBtail
*
ΔBtail
)
Track
(
key
Key
,
nodePath
[]
Node
)
error
{
// XXX Tree|Bucket; path[0] = root
path
:=
nodePathToPath
(
nodePath
)
path
:=
nodePathToPath
(
nodePath
)
...
...
wcfs/internal/zdata/zblk.go
View file @
074e3472
...
@@ -468,7 +468,7 @@ func (bf *ZBigFile) LoadBlk(ctx context.Context, blk int64) (_ []byte, treePath
...
@@ -468,7 +468,7 @@ func (bf *ZBigFile) LoadBlk(ctx context.Context, blk int64) (_ []byte, treePath
// Size returns whole file size.
// Size returns whole file size.
//
//
// it also returns BTree path scaned to obtain the size.
// it also returns BTree path scan
n
ed to obtain the size.
func
(
bf
*
ZBigFile
)
Size
(
ctx
context
.
Context
)
(
_
int64
,
treePath
[]
btree
.
LONode
,
err
error
)
{
func
(
bf
*
ZBigFile
)
Size
(
ctx
context
.
Context
)
(
_
int64
,
treePath
[]
btree
.
LONode
,
err
error
)
{
defer
xerr
.
Contextf
(
&
err
,
"bigfile %s: size"
,
bf
.
POid
())
defer
xerr
.
Contextf
(
&
err
,
"bigfile %s: size"
,
bf
.
POid
())
...
...
wcfs/internal/zdata/zblk_test.go
View file @
074e3472
...
@@ -35,8 +35,6 @@ import (
...
@@ -35,8 +35,6 @@ import (
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/require"
)
)
const
K
=
1024
// TestZBlk verifies that ZBlk* and ZBigFile saved by Python can be read correctly by Go.
// TestZBlk verifies that ZBlk* and ZBigFile saved by Python can be read correctly by Go.
// TODO also test with data saved by Python3.
// TODO also test with data saved by Python3.
func
TestZBlk
(
t
*
testing
.
T
)
{
func
TestZBlk
(
t
*
testing
.
T
)
{
...
...
wcfs/internal/zdata/δftail.go
View file @
074e3472
...
@@ -80,6 +80,8 @@ type ΔFtail struct {
...
@@ -80,6 +80,8 @@ type ΔFtail struct {
δBtail
*
xbtree
.
ΔBtail
δBtail
*
xbtree
.
ΔBtail
fileIdx
map
[
zodb
.
Oid
]
SetZBigFile
// tree-root -> {} ZBigFile as of @head
fileIdx
map
[
zodb
.
Oid
]
SetZBigFile
// tree-root -> {} ZBigFile as of @head
// XXX kill
///*
// XXX don't need vδF - everything is reconstructed at runtime from .δBtail.vδT
// XXX don't need vδF - everything is reconstructed at runtime from .δBtail.vδT
// this way we also don't need to keep up updating vδF from vδT on its rebuild during.
// this way we also don't need to keep up updating vδF from vδT on its rebuild during.
// data with δF changes. Actual for part of tracked set that was taken
// data with δF changes. Actual for part of tracked set that was taken
...
@@ -89,6 +91,7 @@ type ΔFtail struct {
...
@@ -89,6 +91,7 @@ type ΔFtail struct {
// tracked ZBlk that are not yet taken into account in current vδF.
// tracked ZBlk that are not yet taken into account in current vδF.
// grows on new track requests; flushes on queries and update.
// grows on new track requests; flushes on queries and update.
trackNew
map
[
*
ZBigFile
]
map
[
zodb
.
Oid
]
*
zblkInΔFtail
// {} file -> {} oid -> zblk
trackNew
map
[
*
ZBigFile
]
map
[
zodb
.
Oid
]
*
zblkInΔFtail
// {} file -> {} oid -> zblk
//*/
}
}
// ΔF represents a change in files space.
// ΔF represents a change in files space.
...
@@ -353,10 +356,10 @@ func (δFtail *ΔFtail) ForgetPast(revCut zodb.Tid) {
...
@@ -353,10 +356,10 @@ func (δFtail *ΔFtail) ForgetPast(revCut zodb.Tid) {
}
}
// XXX don't need
// XXX don't need
func
(
δFtail
*
ΔFtail
)
SliceByRev
(
lo
,
hi
zodb
.
Tid
)
/*readonly*/
[]
ΔF
{
//
func (δFtail *ΔFtail) SliceByRev(lo, hi zodb.Tid) /*readonly*/ []ΔF {
xtail
.
AssertSlice
(
δFtail
,
lo
,
hi
)
//
xtail.AssertSlice(δFtail, lo, hi)
panic
(
"TODO"
)
//
panic("TODO")
}
//
}
// SliceByFileRev returns history of file changes in (lo, hi] range.
// SliceByFileRev returns history of file changes in (lo, hi] range.
//
//
...
...
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