From: Sage Weil Date: Tue, 1 Dec 2009 22:16:13 +0000 (-0800) Subject: mds: track _note_prepared/committed in normal path, too X-Git-Tag: v0.18~42 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=6c34e6719046a037ce9f5956bc9469d7d0e3ec22;p=ceph.git mds: track _note_prepared/committed in normal path, too This was broken by cd6f3817. --- diff --git a/src/mds/MDSTableClient.cc b/src/mds/MDSTableClient.cc index f693246d948b..1cfea7616b13 100644 --- a/src/mds/MDSTableClient.cc +++ b/src/mds/MDSTableClient.cc @@ -103,7 +103,7 @@ void MDSTableClient::handle_request(class MMDSTableRequest *m) void MDSTableClient::_logged_ack(version_t tid) { - dout(10) << "_logged_ack" << dendl; + dout(10) << "_logged_ack " << tid << dendl; assert(pending_commit.count(tid)); assert(pending_commit[tid]->pending_commit_tids[table].count(tid)); @@ -156,11 +156,13 @@ void MDSTableClient::commit(version_t tid, LogSegment *ls) void MDSTableClient::got_journaled_agree(version_t tid, LogSegment *ls) { + dout(10) << "got_journaled_agree " << tid << dendl; ls->pending_commit_tids[table].insert(tid); pending_commit[tid] = ls; } void MDSTableClient::got_journaled_ack(version_t tid) { + dout(10) << "got_journaled_ack " << tid << dendl; if (pending_commit.count(tid)) pending_commit[tid]->pending_commit_tids[table].erase(tid); pending_commit.erase(tid); diff --git a/src/mds/MDSTableServer.cc b/src/mds/MDSTableServer.cc index db085519bbe0..8eb6a47b54fa 100644 --- a/src/mds/MDSTableServer.cc +++ b/src/mds/MDSTableServer.cc @@ -46,6 +46,7 @@ void MDSTableServer::handle_prepare(MMDSTableRequest *req) bufferlist bl = req->bl; _prepare(req->bl, req->reqid, from); + _note_prepare(from, req->reqid); ETableServer *le = new ETableServer(table, TABLESERVER_OP_PREPARE, req->reqid, from, version, version); le->mutation = bl; // original request, NOT modified return value coming out of _prepare! @@ -73,6 +74,7 @@ void MDSTableServer::handle_commit(MMDSTableRequest *req) if (pending_for_mds.count(tid)) { _commit(tid); + _note_commit(tid); mds->mdlog->submit_entry(new ETableServer(table, TABLESERVER_OP_COMMIT, 0, -1, tid, version)); mds->mdlog->wait_for_sync(new C_Commit(this, req)); }