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
c4ea2ec6
Commit
c4ea2ec6
authored
Oct 21, 2021
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
X wcfs: hook in δFtail.Forget
parent
ad8ff46a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
2 deletions
+17
-2
wcfs/wcfs.go
wcfs/wcfs.go
+17
-2
No files found.
wcfs/wcfs.go
View file @
c4ea2ec6
...
...
@@ -308,6 +308,9 @@ package main
// 4.4) processing ZODB invalidations and serving file reads (see 7) are
// organized to be mutually exclusive.
//
// 5.5) similarly, processing ZODB invalidations and setting up watches (see
// 7.2) are organized to be mutually exclusive.
//
// 5) after OS file cache was invalidated, we resync zhead to new database
// view corresponding to tid.
//
...
...
@@ -481,7 +484,7 @@ import (
"sync"
"sync/atomic"
"syscall"
//
"time"
"time"
log
"github.com/golang/glog"
...
...
@@ -952,7 +955,19 @@ retry:
}
}
// XXX δFtail.ForgetPast(...)
// shrink δFtail not to grow indefinitely.
// cover history for at least 1 minute, but including all watches.
// No need to lock anything because we are holding zheadMu and
// setupWatch too runs with zheadMu locked.
revCut
:=
zodb
.
TidFromTime
(
zhead
.
At
()
.
Time
()
.
Add
(
-
1
*
time
.
Minute
))
for
wlink
:=
range
head
.
wlinkTab
{
for
_
,
w
:=
range
wlink
.
byfile
{
if
w
.
at
<
revCut
{
revCut
=
w
.
at
}
}
}
bfdir
.
δFtail
.
ForgetPast
(
revCut
)
// notify zhead.At waiters
for
hw
:=
range
head
.
hwait
{
...
...
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