Do not journal ack unless the tid is registered in the LogSegment. Once
we journal it, we remove it from the LogSegment list, and once it's
journaled, we remove the pending_commit[tid] entry.
This fixes a bug where the mds got two acks, journaled both of them, and
crashed in the completion for the second because pending_commit[tid] was
gone. The second ack should have been ignored.
break;
case TABLESERVER_OP_ACK:
- if (pending_commit.count(tid)) {
+ if (pending_commit.count(tid) &&
+ pending_commit[tid]->pending_commit_tids[table].count(tid)) {
dout(10) << "got ack on tid " << tid << ", logging" << dendl;
assert(g_conf.mds_kill_mdstable_at != 7);
void MDSTableClient::got_journaled_ack(version_t tid)
{
dout(10) << "got_journaled_ack " << tid << dendl;
- if (pending_commit.count(tid))
+ if (pending_commit.count(tid)) {
pending_commit[tid]->pending_commit_tids[table].erase(tid);
- pending_commit.erase(tid);
+ pending_commit.erase(tid);
+ }
}
void MDSTableClient::finish_recovery()