Bug #22058
closed
class C_SaferCond : public Context {
Mutex lock; ///< Mutex to take
Cond cond; ///< Cond to signal
bool done; ///< true after finish() has been called
int rval; ///< return value
public:
C_SaferCond() : lock("C_SaferCond"), done(false), rval(0) {}
void finish(int r) override { complete(r); }
/// We overload complete in order to not delete the context
void complete(int r) override {
Mutex::Locker l(lock);
done = true;
rval = r;
cond.Signal();
}
/// Returns rval once the Context is called
int wait() {
Mutex::Locker l(lock);
while (!done)
cond.Wait(lock);
return rval;
}
};
I don't understand why it waits forever. the variable 'done' is true if scrub completes
Hrm, I missed that bit of logic. Yes, I don't know why it waits forever either.
- Status changed from New to Need More Info
no log, wait for it to happen again.
- Status changed from Need More Info to Fix Under Review
- Backport deleted (
luminous)
- Status changed from Fix Under Review to Resolved
- Status changed from Resolved to Pending Backport
- Backport set to luminous
- Copied to Backport #22907: luminous: mds: admin socket wait for scrub completion is racy added
- Status changed from Pending Backport to Resolved
Also available in: Atom
PDF