]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: track _note_prepared/committed in normal path, too
authorSage Weil <sage@newdream.net>
Tue, 1 Dec 2009 22:16:13 +0000 (14:16 -0800)
committerSage Weil <sage@newdream.net>
Tue, 1 Dec 2009 23:00:56 +0000 (15:00 -0800)
This was broken by cd6f3817.

src/mds/MDSTableClient.cc
src/mds/MDSTableServer.cc

index f693246d948b5ea4e9266d5c3ca9de54b98b22ef..1cfea7616b13c0ad12a229e790620f44fe2687c8 100644 (file)
@@ -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);
index db085519bbe0463b42f3f2ab4da2d8a0d7b37ae3..8eb6a47b54fa97fb5a38b9b7956f084a4f2e2167 100644 (file)
@@ -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));
   }