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
3ff29a16
Commit
3ff29a16
authored
Dec 26, 2018
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
a97d8c11
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
wcfs/wcfs.go
wcfs/wcfs.go
+8
-4
No files found.
wcfs/wcfs.go
View file @
3ff29a16
...
...
@@ -533,11 +533,11 @@ func (r *Root) zwatcher(ctx context.Context) (err error) {
defer
xerr
.
Contextf
(
&
err
,
"zwatch"
)
// XXX more in context?
// XXX unmount on error? -> always EIO?
zwatchq
:=
make
(
chan
zodb
.
Watch
Event
)
zwatchq
:=
make
(
chan
zodb
.
Commit
Event
)
r
.
zstor
.
AddWatch
(
zwatchq
)
defer
r
.
zstor
.
DelWatch
(
zwatchq
)
var
zevent
zodb
.
Watch
Event
var
zevent
zodb
.
Commit
Event
var
ok
bool
for
{
...
...
@@ -556,7 +556,7 @@ func (r *Root) zwatcher(ctx context.Context) (err error) {
}
// zhandle1 handles 1 event from ZODB notification.
func
(
r
*
Root
)
zhandle1
(
zevent
zodb
.
Watch
Event
)
{
func
(
r
*
Root
)
zhandle1
(
zevent
zodb
.
Commit
Event
)
{
// while we are invalidating OS cache, make sure that nothing, that
// even reads /head/bigfile/*, is running (see 4.6).
r
.
head
.
zconnMu
.
Lock
()
...
...
@@ -1167,7 +1167,11 @@ func main() {
// open zodb storage/db/connection
ctx
:=
context
.
Background
()
// XXX + timeout?
zstor
,
err
:=
zodb
.
OpenStorage
(
ctx
,
zurl
,
&
zodb
.
OpenOptions
{
ReadOnly
:
true
})
zstor
,
err
:=
zodb
.
OpenStorage
(
ctx
,
zurl
,
&
zodb
.
OpenOptions
{
ReadOnly
:
true
,
// FIXME zodb.Cache is not ready for watching and we don't use .Prefetch()
NoCache
:
true
,
})
if
err
!=
nil
{
log
.
Fatal
(
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