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
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Joshua
wendelin.core
Commits
b71f634a
Commit
b71f634a
authored
Feb 21, 2020
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
e84c6c32
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
3 deletions
+12
-3
wcfs/client/wcfs.cpp
wcfs/client/wcfs.cpp
+11
-3
wcfs/client/wcfs.h
wcfs/client/wcfs.h
+1
-0
No files found.
wcfs/client/wcfs.cpp
View file @
b71f634a
...
@@ -54,8 +54,8 @@
...
@@ -54,8 +54,8 @@
// core element in handling WCFS isolation protocol, is effectively invoked
// core element in handling WCFS isolation protocol, is effectively invoked
// synchronously from other threads via messages coming through wcfs server.
// synchronously from other threads via messages coming through wcfs server.
// For example Conn.resync sends watch request to wcfs and waits for the
// For example Conn.resync sends watch request to wcfs and waits for the
// answer. Wcfs server, in turn,
sends corresponding pin messages to the pinner
// answer. Wcfs server, in turn,
might send corresponding pin messages to the
//
and _waits
_ for the answere before answering to resync:
//
pinner and _wait
_ for the answere before answering to resync:
//
//
// - - - - - -
// - - - - - -
// | .···|·····. ----> = request
// | .···|·····. ----> = request
...
@@ -139,7 +139,7 @@ pair<Conn, error> WCFS::connect(zodb::Tid at) {
...
@@ -139,7 +139,7 @@ pair<Conn, error> WCFS::connect(zodb::Tid at) {
// and stats head/f to get f.headfsize _before_ that.
// and stats head/f to get f.headfsize _before_ that.
// -> just wait here.
// -> just wait here.
// XXX atMu.RLock ?
// XXX atMu.RLock ?
err
=
wconn
.
_headWait
(
at
);
err
=
wconn
->
_headWait
(
at
);
if
(
err
!=
nil
)
{
if
(
err
!=
nil
)
{
// XXX bring conn down - stop pinner
// XXX bring conn down - stop pinner
return
make_pair
(
nil
,
E
(
err
));
return
make_pair
(
nil
,
E
(
err
));
...
@@ -149,6 +149,14 @@ pair<Conn, error> WCFS::connect(zodb::Tid at) {
...
@@ -149,6 +149,14 @@ pair<Conn, error> WCFS::connect(zodb::Tid at) {
}
}
// _headWait waits till wcfs/head/at becomes ≥ at.
//
// XXX locks condition?
error
_Conn
::
_headWait
(
zodb
::
Tid
at
)
{
// XXX +ctx ?
// FIXME implement
return
nil
;
}
static
global
<
error
>
errConnClosed
=
errors
::
New
(
"connection closed"
);
static
global
<
error
>
errConnClosed
=
errors
::
New
(
"connection closed"
);
// close releases resources associated with wconn.
// close releases resources associated with wconn.
...
...
wcfs/client/wcfs.h
View file @
b71f634a
...
@@ -208,6 +208,7 @@ private:
...
@@ -208,6 +208,7 @@ private:
error
__pinner
(
context
::
Context
ctx
);
error
__pinner
(
context
::
Context
ctx
);
error
_pin1
(
PinReq
*
req
);
error
_pin1
(
PinReq
*
req
);
error
__pin1
(
PinReq
*
req
);
error
__pin1
(
PinReq
*
req
);
error
_headWait
(
zodb
::
Tid
at
);
};
};
// FileH represent isolated file view under Conn.
// FileH represent isolated file view under Conn.
...
...
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