Commit 1e7e5180 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 28b720a7
......@@ -55,7 +55,7 @@
// Such requests originate from regular client threads - not pinner - via entry
// points like Conn.open, Conn.resync and FileH.close.
//
// Every FileH maintains fileh._pinned {} with currently pinned blk -> rev. The
// Every FileH maintains fileh._pinned {} with currently pinned blk -> rev. This
// dict is updated by pinner driven by pin messages, and is used when either
// new fileh Mapping is created (FileH.mmap) or refreshed due to request from
// virtmem (Mapping.remmap_blk, see below).
......@@ -108,8 +108,8 @@
// --------
//
// (*) see wcfs.go documentation for WCFS isolation protocol overview and details.
// (+) currently, for simplicity, there is one pinner for each connection. In
// the future, for efficiency, it might be reworked to be one pinner thread
// (+) currently, for simplicity, there is one pinner thread for each connection.
// In the future, for efficiency, it might be reworked to be one pinner thread
// that serves all connections simultaneously.
......@@ -200,7 +200,7 @@ pair<Conn, error> WCFS::connect(zodb::Tid at) {
return wconn->_pinner(ctx);
});
// need to wait till `wcfs/head/at ≥ at` because e.g. Conn.open stats stats
// need to wait till `wcfs/head/at ≥ at` because e.g. Conn.open stats
// head/f to get f.headfsize.
// XXX atMu.RLock ?
err = wconn->_headWait(at);
......@@ -307,7 +307,8 @@ error _Conn::_pinner(context::Context ctx) {
// XXX deadlock wrt resync? (who read-locks wconn.mu)
wconn._mu.Lock(); // XXX locking ok? -> merge into below where lock is held?
if (wconn._downErr == nil) {
wconn._downErr = fmt::errorf("no longer operational due to: %w", err); // XXX err=nil ?
wconn._downErr = fmt::errorf("no longer operational due to: %w",
err != nil ? err : fmt::errorf("pinner exit"));
// XXX make all fileh and mapping invalid.
}
wconn._mu.Unlock();
......
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