Commit e783f02d authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 6fc36ed0
...@@ -597,7 +597,8 @@ error _Conn::resync(zodb::Tid at) { ...@@ -597,7 +597,8 @@ error _Conn::resync(zodb::Tid at) {
continue; continue;
string ack; 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) if (err != nil)
return E(err); return E(err);
if (ack != "ok") { if (ack != "ok") {
...@@ -695,7 +696,7 @@ retry: ...@@ -695,7 +696,7 @@ retry:
wconn._filehMu.Unlock(); wconn._filehMu.Unlock();
// do the actuall open. // 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(); f->_openErr = f->_open();
if (f->_openErr != nil) if (f->_openErr != nil)
return make_pair(nil, E(f->_openErr)); return make_pair(nil, E(f->_openErr));
...@@ -740,9 +741,8 @@ error _FileH::_open() { ...@@ -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 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 // NOTE wcfs will reply "ok" only after wcfs/head/at ≥ wconn.at
string ack; string ack;
// XXX f._watchMu.lock() + unlock ? tie(ack, err) = wconn->_wlink->sendReq(context::background(),
// XXX + recheck status before sending the watch? 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) if (err != nil)
return err; return err;
if (ack != "ok") if (ack != "ok")
...@@ -799,7 +799,8 @@ error _FileH::close() { ...@@ -799,7 +799,8 @@ error _FileH::close() {
// stop watching f // stop watching f
string ack; 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) if (err != nil)
reterr1(err); reterr1(err);
else if (ack != "ok") 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