Commit e783f02d authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 6fc36ed0
......@@ -597,7 +597,8 @@ error _Conn::resync(zodb::Tid at) {
continue;
string ack;
tie(ack, err) = wconn._wlink->sendReq(context::background(), fmt::sprintf("watch %s @%s", v(foid), v(at)));
tie(ack, err) = wconn._wlink->sendReq(context::background(),
fmt::sprintf("watch %s @%s", v(foid), v(at)));
if (err != nil)
return E(err);
if (ack != "ok") {
......@@ -695,7 +696,7 @@ retry:
wconn._filehMu.Unlock();
// do the actuall open.
// We hold only wconn.atMu.R, but not wconn.filehMu, nor f.mu .
// we hold only wconn.atMu.R, but niether wconn.filehMu, nor f.mu .
f->_openErr = f->_open();
if (f->_openErr != nil)
return make_pair(nil, E(f->_openErr));
......@@ -740,9 +741,8 @@ error _FileH::_open() {
// NOTE we are _not_ holding wconn.filehMu nor f.mu - only wconn.atMu to rely on wconn.at being stable.
// NOTE wcfs will reply "ok" only after wcfs/head/at ≥ wconn.at
string ack;
// XXX f._watchMu.lock() + unlock ?
// XXX + recheck status before sending the watch?
tie(ack, err) = wconn->_wlink->sendReq(context::background(), fmt::sprintf("watch %s @%s", v(foid), v(wconn->at)));
tie(ack, err) = wconn->_wlink->sendReq(context::background(),
fmt::sprintf("watch %s @%s", v(foid), v(wconn->at)));
if (err != nil)
return err;
if (ack != "ok")
......@@ -799,7 +799,8 @@ error _FileH::close() {
// stop watching f
string ack;
tie(ack, err) = wconn->_wlink->sendReq(context::background(), fmt::sprintf("watch %s -", v(foid)));
tie(ack, err) = wconn->_wlink->sendReq(context::background(),
fmt::sprintf("watch %s -", v(foid)));
if (err != nil)
reterr1(err);
else if (ack != "ok")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment