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
153e02e6
Commit
153e02e6
authored
Sep 10, 2020
by
Kirill Smelkov
2
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
X test_wcfs_watch_setup and test_wcfs_watch_setup_ahead work again
parent
cc216b8c
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
3 deletions
+15
-3
wcfs/wcfs.go
wcfs/wcfs.go
+14
-1
wcfs/wcfs_test.py
wcfs/wcfs_test.py
+1
-2
No files found.
wcfs/wcfs.go
View file @
153e02e6
...
...
@@ -615,6 +615,9 @@ type BigFile struct {
// //go:generate ./gen-δtail I64 int64 zδtail_i64.go
// δtail *ΔTailI64 // [](rev↑, []#blk)
// blocks that were ever read-accessed (head/ only) XXX locking by bfdir.δFmu ?
accessed
SetI64
// inflight loadings of ZBigFile from ZODB.
// successful load results are kept here until blkdata is put into OS pagecache.
//
...
...
@@ -1349,7 +1352,7 @@ retry:
//
// (see "7.2) for all registered client@at watchers ...")
const
_traceIso
=
tru
e
const
_traceIso
=
fals
e
func
traceIso
(
format
string
,
argv
...
interface
{})
{
if
!
_traceIso
{
return
...
...
@@ -1479,6 +1482,7 @@ func (f *BigFile) readPinWatchers(ctx context.Context, blk int64, treepath []btr
δFtail
:=
bfdir
.
δFtail
bfdir
.
δFmu
.
Lock
()
// XXX locking correct? XXX -> better push down?
δFtail
.
Track
(
f
,
blk
,
treepath
,
zblk
)
// XXX pass in zblk.rev here?
f
.
accessed
.
Add
(
blk
)
bfdir
.
δFmu
.
Unlock
()
// make sure that file[blk] on clients side stays as of @w.at state.
...
...
@@ -1680,6 +1684,14 @@ func (wlink *WatchLink) setupWatch(ctx context.Context, foid zodb.Oid, at zodb.T
if
already
{
continue
}
// blk might be in δFtail because it is adjacent in
// ZBigFile.blktab to another blk that was explicitly
// tracked. However wcfs tests expect that only blocks
// that were previously explicitly accessed are
// included into watch setup pins.
if
!
f
.
accessed
.
Has
(
blk
)
{
continue
}
toPin
[
blk
],
_
=
δFtail
.
LastBlkRev
(
ctx
,
f
,
blk
,
at
)
// XXX err
}
...
...
@@ -2170,6 +2182,7 @@ func (head *Head) bigopen(ctx context.Context, oid zodb.Oid) (_ *BigFile, err er
// FIXME: scan zfile.blktab - so that we can detect all btree changes
// see "XXX building δFtail lazily ..." in notes.txt
f
.
accessed
=
make
(
SetI64
)
f
.
watchTab
=
make
(
map
[
*
Watch
]
struct
{})
}
...
...
wcfs/wcfs_test.py
View file @
153e02e6
...
...
@@ -1019,7 +1019,7 @@ def _blkRevAt(t, zf, blk, at): # -> rev
return
rev
# _pinnedAt returns which blocks need
s
to be pinned for zf@at compared to zf@head
# _pinnedAt returns which blocks need to be pinned for zf@at compared to zf@head
# according to wcfs isolation protocol.
#
# Criteria for when blk must be pinned as of @at view:
...
...
@@ -1141,7 +1141,6 @@ def test_wcfs_basic():
# verify how wcfs processes ZODB invalidations when hole becomes a block with data.
# TODO merge into test_wcfs_basic & watch tests after δbtree is done
@
func
def
test_wcfs_basic_hole2zblk
():
t
=
tDB
();
zf
=
t
.
zfile
...
...
Kirill Smelkov
@kirr
mentioned in commit
6f0cdaff
·
Oct 28, 2021
mentioned in commit
6f0cdaff
mentioned in commit 6f0cdaff23d4f8c3384b74b02d669c7fcfc2d821
Toggle commit list
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