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
102b571e
Commit
102b571e
authored
Jul 04, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
e177e16e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
10 deletions
+9
-10
wcfs/wcfs.go
wcfs/wcfs.go
+8
-9
wcfs/wcfs_test.py
wcfs/wcfs_test.py
+1
-1
No files found.
wcfs/wcfs.go
View file @
102b571e
...
...
@@ -572,10 +572,8 @@ type BigFile struct {
//
// both watches in already "established" state (i.e. initial watch
// request was completed and answered with "ok"), and watches in
// progress of being established. XXX text
//
// XXX locking -> watchMu?
// XXX -> watches ?
// progress of being established are kept here.
watchMu
sync
.
Mutex
// XXX use
watchTab
map
[
*
Watch
]
struct
{}
}
...
...
@@ -1164,8 +1162,8 @@ func (f *BigFile) readBlk(ctx context.Context, blk int64, dest []byte) (err erro
}
// we have the data - it can be used after watchers are updated
// XXX should we use ctx here? (see
p
inWatchers comments)
f
.
p
inWatchers
(
ctx
,
blk
,
treepath
,
zblk
,
blkrevMax
)
// XXX should we use ctx here? (see
readP
inWatchers comments)
f
.
readP
inWatchers
(
ctx
,
blk
,
treepath
,
zblk
,
blkrevMax
)
// data can be used now
close
(
loading
.
ready
)
...
...
@@ -1322,8 +1320,9 @@ func (w *Watch) _pin(ctx context.Context, blk int64, rev zodb.Tid) (err error) {
return
nil
}
*/
//
p
inWatchers complements readBlk: it sends `pin blk` for watchers of the file
//
readP
inWatchers complements readBlk: it sends `pin blk` for watchers of the file
// after a block was loaded from ZODB and before block data is returned to kernel.
//
// See "7.2) for all registered client@at watchers ..."
...
...
@@ -1333,7 +1332,7 @@ func (w *Watch) _pin(ctx context.Context, blk int64, rev zodb.Tid) (err error) {
// XXX do we really need to use/propagate caller context here? ideally update
// watchers should be synchronous, and in practice we just use 30s timeout.
// Should a READ interrupt cause watch update failure?
func
(
f
*
BigFile
)
p
inWatchers
(
ctx
context
.
Context
,
blk
int64
,
treepath
[]
btree
.
LONode
,
zblk
zBlk
,
blkrevMax
zodb
.
Tid
)
{
func
(
f
*
BigFile
)
readP
inWatchers
(
ctx
context
.
Context
,
blk
int64
,
treepath
[]
btree
.
LONode
,
zblk
zBlk
,
blkrevMax
zodb
.
Tid
)
{
// only head/ is being watched for
if
f
.
head
.
rev
!=
0
{
return
...
...
wcfs/wcfs_test.py
View file @
102b571e
...
...
@@ -207,7 +207,7 @@ class tDB:
# still wait for request completion even after fatal signal )
t
.
_closed
=
chan
()
t
.
_wcfuseabort
=
open
(
"/sys/fs/fuse/connections/%d/abort"
%
os
.
stat
(
testmntpt
).
st_dev
,
"w"
)
go
(
t
.
_abort_ontimeout
,
7
*
time
.
second
)
# NOTE must be >> with_timeout
go
(
t
.
_abort_ontimeout
,
10
*
time
.
second
)
# NOTE must be >> with_timeout
# ZBigFile(s) scheduled for commit
t
.
_changed
=
{}
# ZBigFile -> {} blk -> data
...
...
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