Commit fff59cb0 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent cc88c535
...@@ -301,7 +301,8 @@ error _Conn::close() { ...@@ -301,7 +301,8 @@ error _Conn::close() {
// XXX f locking // XXX f locking
for (auto _ : wconn._filehTab) { for (auto _ : wconn._filehTab) {
auto f = _.second; //zodb::Oid fid = _.first;
FileH f = _.second;
err = f->_headf->close(); // XXX mark fileh as down so that fileh.close does not say "bad fd" err = f->_headf->close(); // XXX mark fileh as down so that fileh.close does not say "bad fd"
if (err != nil) if (err != nil)
reterr1(err); reterr1(err);
...@@ -338,7 +339,7 @@ error _Conn::_pinner(context::Context ctx) { ...@@ -338,7 +339,7 @@ error _Conn::_pinner(context::Context ctx) {
if (wconn._downErr == nil) { if (wconn._downErr == nil) {
wconn._downErr = fmt::errorf("no longer operational due to: %w", wconn._downErr = fmt::errorf("no longer operational due to: %w",
err != nil ? err : fmt::errorf("pinner exit")); err != nil ? err : fmt::errorf("pinner exit"));
// XXX error -> make all fileh and mapping invalid. // XXX error -> wconn.down() = make all fileh and mapping invalid.
} }
wconn._filehMu.Unlock(); wconn._filehMu.Unlock();
...@@ -488,6 +489,7 @@ error _Conn::__pin1(PinReq *req) { ...@@ -488,6 +489,7 @@ error _Conn::__pin1(PinReq *req) {
// on error don't need to continue with other mappings - all fileh and // on error don't need to continue with other mappings - all fileh and
// all mappings become marked invalid on pinner failure. // all mappings become marked invalid on pinner failure.
//
// XXX all call wconn._down from here under wconn._filehMu lock? // XXX all call wconn._down from here under wconn._filehMu lock?
if (err != nil) if (err != nil)
return err; return err;
...@@ -526,7 +528,7 @@ error _Conn::resync(zodb::Tid at) { ...@@ -526,7 +528,7 @@ error _Conn::resync(zodb::Tid at) {
// we need this e.g. to be sure that head/f.size is at least as big that it will be @at state. // we need this e.g. to be sure that head/f.size is at least as big that it will be @at state.
err = wconn._headWait(at); err = wconn._headWait(at);
if (err != nil) if (err != nil)
return err; // XXX -> wconn down on err ? return err; // XXX -> wconn down on err XXX + all return vvv
// lock wconn._atMu.W . This excludes everything else, and in // lock wconn._atMu.W . This excludes everything else, and in
......
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