Project

General

Profile

Bug #41216

os/bluestore: Don't forget sub kv_submitted_waiters.

Added by jianpeng ma over 4 years ago. Updated over 4 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
% Done:

0%

Source:
Tags:
Backport:
nautilus
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

in func flush_all_but_last, it forgets to dec kv_submitted_waiters when it returns for condition "it->state >= TransContext::STATE_KV_SUBMITTE".
void flush_all_but_last() {
std::unique_lock l(qlock);
assert (q.size() >= 1);
while (true) {
// set flag before the check because the condition
// may become true outside qlock, and we need to make
// sure those threads see waiters and signal qcond.
+kv_submitted_waiters;
if (q.size() <= 1) {
--kv_submitted_waiters;
return;
} else {
auto it = q.rbegin();
it
+;
if (it->state >= TransContext::STATE_KV_SUBMITTED) {
return;
}
}
qcond.wait(l);
--kv_submitted_waiters;
}
}


Related issues

Copied to Ceph - Backport #41258: nautilus: os/bluestore: Don't forget sub kv_submitted_waiters. Resolved

History

#2 Updated by Kefu Chai over 4 years ago

  • Status changed from New to Pending Backport
  • Backport set to nautilus

#3 Updated by Nathan Cutler over 4 years ago

  • Copied to Backport #41258: nautilus: os/bluestore: Don't forget sub kv_submitted_waiters. added

#4 Updated by Igor Fedotov over 4 years ago

  • Pull request ID set to 29522

#5 Updated by Nathan Cutler over 4 years ago

  • Status changed from Pending Backport to Resolved

While running with --resolve-parent, the script "backport-create-issue" noticed that all backports of this issue are in status "Resolved" or "Rejected".

Also available in: Atom PDF