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
1e7e5180
Commit
1e7e5180
authored
Mar 02, 2020
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
28b720a7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
wcfs/client/wcfs.cpp
wcfs/client/wcfs.cpp
+6
-5
No files found.
wcfs/client/wcfs.cpp
View file @
1e7e5180
...
...
@@ -55,7 +55,7 @@
// Such requests originate from regular client threads - not pinner - via entry
// points like Conn.open, Conn.resync and FileH.close.
//
// Every FileH maintains fileh._pinned {} with currently pinned blk -> rev. Th
e
// Every FileH maintains fileh._pinned {} with currently pinned blk -> rev. Th
is
// dict is updated by pinner driven by pin messages, and is used when either
// new fileh Mapping is created (FileH.mmap) or refreshed due to request from
// virtmem (Mapping.remmap_blk, see below).
...
...
@@ -108,8 +108,8 @@
// --------
//
// (*) see wcfs.go documentation for WCFS isolation protocol overview and details.
// (+) currently, for simplicity, there is one pinner
for each connection. In
// the future, for efficiency, it might be reworked to be one pinner thread
// (+) currently, for simplicity, there is one pinner
thread for each connection.
//
In
the future, for efficiency, it might be reworked to be one pinner thread
// that serves all connections simultaneously.
...
...
@@ -200,7 +200,7 @@ pair<Conn, error> WCFS::connect(zodb::Tid at) {
return
wconn
->
_pinner
(
ctx
);
});
// need to wait till `wcfs/head/at ≥ at` because e.g. Conn.open stats
stats
// need to wait till `wcfs/head/at ≥ at` because e.g. Conn.open stats
// head/f to get f.headfsize.
// XXX atMu.RLock ?
err
=
wconn
->
_headWait
(
at
);
...
...
@@ -307,7 +307,8 @@ error _Conn::_pinner(context::Context ctx) {
// XXX deadlock wrt resync? (who read-locks wconn.mu)
wconn
.
_mu
.
Lock
();
// XXX locking ok? -> merge into below where lock is held?
if
(
wconn
.
_downErr
==
nil
)
{
wconn
.
_downErr
=
fmt
::
errorf
(
"no longer operational due to: %w"
,
err
);
// XXX err=nil ?
wconn
.
_downErr
=
fmt
::
errorf
(
"no longer operational due to: %w"
,
err
!=
nil
?
err
:
fmt
::
errorf
(
"pinner exit"
));
// XXX make all fileh and mapping invalid.
}
wconn
.
_mu
.
Unlock
();
...
...
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