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
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Joshua
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 {
// XXX objects in path must be with .PJar().At() == .head
// XXX path -> []oid ?
func
(
δb
*
ΔTail
)
Track
(
path
[]
Node
)
{
// XXX Tree|Bucket; path[0] = root
/*
root = path[0]
for obj in path:
if not obj in trackIdx:
.trackNew += obj
.trackIdx[obj] += root
XXX update diff XXX here? or as separate step?
XXX update lastRevOf
*/
l
:=
len
(
path
)
if
l
==
0
{
panic
(
"empty path"
)
}
root
:=
path
[
0
]
.
(
*
Tree
)
// XXX assert Tree Tree ... Tree Bucket
for
_
,
node
:=
range
path
{
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.
...
...
wcfs/wcfs.go
View file @
16bd9797
...
...
@@ -522,7 +522,7 @@ type BigFile struct {
rev
zodb
.
Tid
// last revision that modified zfile data
// // tail change history of this file.
// δtail *ΔTailI64 // [](rev↑, []#blk)
δtail
*
ΔTailI64
// [](rev↑, []#blk) XXX kill
// inflight loadings of ZBigFile from ZODB.
// 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
size
:
size
,
rev
:
rev
,
// XXX this is needed only for head/
δtail
:
NewΔTailI64
(
zconn
.
At
()),
//
// XXX this is needed only for head/
//
δtail: NewΔTailI64(zconn.At()),
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