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
5af13240
Commit
5af13240
authored
Jul 20, 2021
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
024dde83
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
wcfs/wcfs.go
wcfs/wcfs.go
+6
-6
No files found.
wcfs/wcfs.go
View file @
5af13240
...
...
@@ -368,7 +368,7 @@ package main
// rev(blk) ≤ rev'(blk) rev'(blk) = min(^^^)
//
//
// XXX we delay recomputing δFtail.
LastBlkRev
(file, #blk, head) because
// XXX we delay recomputing δFtail.
BlkRevAt
(file, #blk, head) because
// using just cheap revmax estimate can frequently result in all watches
// being skipped.
//
...
...
@@ -1088,8 +1088,8 @@ func (f *BigFile) invalidateBlk(ctx context.Context, blk int64, oldHead zodb.Tid
func
()
{
// store retrieved data back to OS cache for file @<rev>/file[blk]
δFtail
:=
f
.
head
.
bfdir
.
δFtail
// blkrev, _ := δFtail.
LastBlkRev
(ctx, f.zfile, blk, f.head.zconn.At())
blkrev
,
_
:=
δFtail
.
LastBlkRev
(
ctx
,
f
.
zfile
,
blk
,
oldHead
)
// blkrev, _ := δFtail.
BlkRevAt
(ctx, f.zfile, blk, f.head.zconn.At())
blkrev
,
_
:=
δFtail
.
BlkRevAt
(
ctx
,
f
.
zfile
,
blk
,
oldHead
)
frev
,
funlock
,
err
:=
groot
.
lockRevFile
(
blkrev
,
f
.
zfile
.
POid
())
if
err
!=
nil
{
log
.
Errorf
(
"BUG: %s: invalidate blk #%d: %s (ignoring, but reading @revX/bigfile will be slow)"
,
f
.
path
(),
blk
,
err
)
...
...
@@ -1567,7 +1567,7 @@ func (f *BigFile) readPinWatchers(ctx context.Context, blk int64, treepath []btr
// we'll relock atMu again and recheck blkrev vs w.at after.
w
.
atMu
.
RUnlock
()
blkrev
,
_
=
δFtail
.
LastBlkRev
(
ctx
,
f
.
zfile
,
blk
,
f
.
head
.
zconn
.
At
())
blkrev
,
_
=
δFtail
.
BlkRevAt
(
ctx
,
f
.
zfile
,
blk
,
f
.
head
.
zconn
.
At
())
blkrevRough
=
false
w
.
atMu
.
RLock
()
...
...
@@ -1583,7 +1583,7 @@ func (f *BigFile) readPinWatchers(ctx context.Context, blk int64, treepath []btr
// and most of them would be on different w.at - cache of the file will
// be lost. Via pinning to particular block revision, we make sure the
// revision to pin is the same on all clients, and so file cache is shared.
pinrev
,
_
:=
δFtail
.
LastBlkRev
(
ctx
,
w
.
file
.
zfile
,
blk
,
w
.
at
)
// XXX move into go?
pinrev
,
_
:=
δFtail
.
BlkRevAt
(
ctx
,
w
.
file
.
zfile
,
blk
,
w
.
at
)
// XXX move into go?
// XXX ^^^ w.file vs f ?
//fmt.Printf("S: read #%d: watch @%s: pin -> @%s\n", blk, w.at, pinrev)
...
...
@@ -1765,7 +1765,7 @@ func (wlink *WatchLink) setupWatch(ctx context.Context, foid zodb.Oid, at zodb.T
continue
}
toPin
[
blk
],
_
=
δFtail
.
LastBlkRev
(
ctx
,
f
.
zfile
,
blk
,
at
)
// XXX err
toPin
[
blk
],
_
=
δFtail
.
BlkRevAt
(
ctx
,
f
.
zfile
,
blk
,
at
)
// XXX err
}
}
...
...
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