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
912fa765
Commit
912fa765
authored
Jun 24, 2020
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
52871b8a
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
9 deletions
+7
-9
wcfs/wcfs.go
wcfs/wcfs.go
+3
-3
wcfs/δbtail.go
wcfs/δbtail.go
+1
-1
wcfs/δbtail_test.go
wcfs/δbtail_test.go
+1
-1
wcfs/δftail.go
wcfs/δftail.go
+2
-4
No files found.
wcfs/wcfs.go
View file @
912fa765
...
...
@@ -932,7 +932,7 @@ retry:
}
file
.
size
=
size
bfdir
.
δFtail
.
Track
(
ctx
,
file
,
-
1
,
sizePath
,
nil
)
bfdir
.
δFtail
.
Track
(
file
,
-
1
,
sizePath
,
nil
)
// XXX we can miss a change to file if δblk is not yet tracked
// -> need to update file.rev at read time -> locking=XXX
...
...
@@ -1469,7 +1469,7 @@ func (f *BigFile) readPinWatchers(ctx context.Context, blk int64, treepath []btr
bfdir
:=
f
.
head
.
bfdir
δFtail
:=
bfdir
.
δFtail
bfdir
.
δFmu
.
Lock
()
// XXX locking correct? XXX -> better push down?
δFtail
.
Track
(
ctx
,
f
,
blk
,
treepath
,
zblk
)
// XXX pass in zblk.rev here?
δFtail
.
Track
(
f
,
blk
,
treepath
,
zblk
)
// XXX pass in zblk.rev here?
bfdir
.
δFmu
.
Unlock
()
// make sure that file[blk] on clients side stays as of @w.at state.
...
...
@@ -2156,7 +2156,7 @@ func (head *Head) bigopen(ctx context.Context, oid zodb.Oid) (_ *BigFile, err er
// only head/ needs δFtail, f.δtail and watches.
if
head
.
rev
==
0
{
head
.
bfdir
.
δFmu
.
Lock
()
// XXX locking ok?
head
.
bfdir
.
δFtail
.
Track
(
ctx
,
f
,
-
1
,
sizePath
,
nil
)
head
.
bfdir
.
δFtail
.
Track
(
f
,
-
1
,
sizePath
,
nil
)
head
.
bfdir
.
δFmu
.
Unlock
()
// FIXME: scan zfile.blktab - so that we can detect all btree changes
...
...
wcfs/δbtail.go
View file @
912fa765
...
...
@@ -279,7 +279,7 @@ const (
// -> this requires to merge δc returned by diffT and adjust bChildren to tail into
// -> it will use less memory and offload Track from (re)loading leaf bucket
// ... for now we go more simple way
func
(
δBtail
*
ΔBtail
)
Track
(
ctx
context
.
Context
,
key
Key
,
keyPresent
bool
,
path
[]
Node
,
flags
TrackFlags
)
error
{
// XXX Tree|Bucket; path[0] = root
func
(
δBtail
*
ΔBtail
)
Track
(
key
Key
,
keyPresent
bool
,
path
[]
Node
,
flags
TrackFlags
)
error
{
// XXX Tree|Bucket; path[0] = root
l
:=
len
(
path
)
if
l
==
0
{
panic
(
"empty path"
)
...
...
wcfs/δbtail_test.go
View file @
912fa765
...
...
@@ -589,7 +589,7 @@ func xverifyΔBTail1(t *testing.T, subj string, db *zodb.DB, treeRoot zodb.Oid,
if
k
==
kInf
{
trackFlags
=
TrackMaxKey
}
err
=
δbtail
.
Track
(
ctx
,
k
,
ok
,
path
,
trackFlags
);
X
(
err
)
err
=
δbtail
.
Track
(
k
,
ok
,
path
,
trackFlags
);
X
(
err
)
kadjTracked
.
Update
(
kadj
[
k
])
}
...
...
wcfs/δftail.go
View file @
912fa765
...
...
@@ -136,15 +136,13 @@ func (δFtail *ΔFtail) Tail() zodb.Tid { return δFtail.δBtail.Tail() }
// XXX text
//
// A root can be associated with several files (each provided on different Track call).
//
// XXX try to avoid ctx
func
(
δFtail
*
ΔFtail
)
Track
(
ctx
context
.
Context
,
file
*
BigFile
,
blk
int64
,
path
[]
btree
.
LONode
,
zblk
zBlk
)
{
func
(
δFtail
*
ΔFtail
)
Track
(
file
*
BigFile
,
blk
int64
,
path
[]
btree
.
LONode
,
zblk
zBlk
)
{
δbTrackFlags
:=
TrackFlags
(
0
)
if
blk
==
-
1
{
// XXX blk = ∞ ?
δbTrackFlags
=
TrackMaxKey
}
err
:=
δFtail
.
δBtail
.
Track
(
ctx
,
blk
,
zblk
!=
nil
,
path
,
δbTrackFlags
)
err
:=
δFtail
.
δBtail
.
Track
(
blk
,
zblk
!=
nil
,
path
,
δbTrackFlags
)
if
err
!=
nil
{
panic
(
err
)
// XXX -> error? errctx
}
...
...
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