Commit 07700777 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent a4a66607
......@@ -165,8 +165,10 @@ error _Conn::_pinner(context::Context ctx) {
// mark the connection non-operational if the pinner fails
wconn._downMu.lock();
if (wconn._downErr == nil)
if (wconn._downErr == nil) {
wconn._downErr = fmt::errorf("no longer operational due to: %s", v(err));
// XXX make all fileh and mapping invalid.
}
wconn._downMu.unlock();
return err;
......@@ -424,9 +426,13 @@ error _Conn::resync(zodb::Tid at) {
xerr::Contextf E("conn @%s: resync -> @%s", v(wconn.at), v(at)); // XXX +wcfs path?
// XXX locking
error err;
if (wconn._downErr != nil) // XXX lock with _filehmu
return E(wconn._downErr);
wconn._downMu.lock();
err = wconn._downErr;
wconn._downMu.unlock();
if (err != nil)
return E(err);
for (auto fit : wconn._filehtab) {
zodb::Oid foid = fit.first;
......@@ -437,7 +443,7 @@ error _Conn::resync(zodb::Tid at) {
// update f._headfsize and remmap to head/f zero regions that are now covered by head/f
struct stat st;
error err = f->_headf->stat(&st);
err = f->_headf->stat(&st);
if (err != nil)
return E(err);
......
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