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
16bd9797
Commit
16bd9797
authored
Apr 03, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
5cb986db
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
13 deletions
+23
-13
wcfs/internal/xbtree/δbtail.go
wcfs/internal/xbtree/δbtail.go
+20
-10
wcfs/wcfs.go
wcfs/wcfs.go
+3
-3
No files found.
wcfs/internal/xbtree/δbtail.go
View file @
16bd9797
...
@@ -162,16 +162,26 @@ func (δb *ΔTail) Tail() zodb.Tid {
...
@@ -162,16 +162,26 @@ func (δb *ΔTail) Tail() zodb.Tid {
// XXX objects in path must be with .PJar().At() == .head
// XXX objects in path must be with .PJar().At() == .head
// XXX path -> []oid ?
// XXX path -> []oid ?
func
(
δb
*
ΔTail
)
Track
(
path
[]
Node
)
{
// XXX Tree|Bucket; path[0] = root
func
(
δb
*
ΔTail
)
Track
(
path
[]
Node
)
{
// XXX Tree|Bucket; path[0] = root
/*
l
:=
len
(
path
)
root = path[0]
if
l
==
0
{
for obj in path:
panic
(
"empty path"
)
if not obj in trackIdx:
}
.trackNew += obj
root
:=
path
[
0
]
.
(
*
Tree
)
.trackIdx[obj] += root
// XXX assert Tree Tree ... Tree Bucket
XXX update diff XXX here? or as separate step?
for
_
,
node
:=
range
path
{
XXX update lastRevOf
oid
:=
node
.
POid
()
*/
nodeRoots
,
ok
:=
δb
.
trackIdx
[
oid
]
if
!
ok
{
nodeRoots
=
make
(
SetTree
)
δb
.
trackIdx
[
oid
]
=
nodeRoots
// XXX .trackNew += oid
}
nodeRoots
.
Add
(
root
)
}
// XXX update diff XXX here? or as separate step?
// XXX update lastRevOf
}
}
// Update updates δB with per-object level ZODB changes.
// Update updates δB with per-object level ZODB changes.
...
...
wcfs/wcfs.go
View file @
16bd9797
...
@@ -522,7 +522,7 @@ type BigFile struct {
...
@@ -522,7 +522,7 @@ type BigFile struct {
rev
zodb
.
Tid
// last revision that modified zfile data
rev
zodb
.
Tid
// last revision that modified zfile data
// // tail change history of this file.
// // tail change history of this file.
// δtail *ΔTailI64 // [](rev↑, []#blk)
δtail
*
ΔTailI64
// [](rev↑, []#blk) XXX kill
// inflight loadings of ZBigFile from ZODB.
// inflight loadings of ZBigFile from ZODB.
// successful load results are kept here until blkdata is put into OS pagecache.
// successful load results are kept here until blkdata is put into OS pagecache.
...
@@ -1696,8 +1696,8 @@ func (head *Head) bigopen(ctx context.Context, oid zodb.Oid) (_ *BigFile, err er
...
@@ -1696,8 +1696,8 @@ func (head *Head) bigopen(ctx context.Context, oid zodb.Oid) (_ *BigFile, err er
size
:
size
,
size
:
size
,
rev
:
rev
,
rev
:
rev
,
// XXX this is needed only for head/
//
// XXX this is needed only for head/
δtail
:
NewΔTailI64
(
zconn
.
At
()),
//
δtail: NewΔTailI64(zconn.At()),
loading
:
make
(
map
[
int64
]
*
blkLoadState
),
loading
:
make
(
map
[
int64
]
*
blkLoadState
),
}
}
...
...
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