diff options
author | Yan, Zheng <zheng.z.yan@intel.com> | 2013-03-31 08:19:17 +0200 |
---|---|---|
committer | Greg Farnum <greg@inktank.com> | 2013-04-01 18:26:24 +0200 |
commit | 93ab1edd102a450a9f2bd39bb6245e8182f4b095 (patch) | |
tree | 8cbe16159b12c40377d477bc267d424c52033329 /src/mds/MDSTableServer.cc | |
parent | mds: clear scatter dirty if replica inode has no auth subtree (diff) | |
download | ceph-93ab1edd102a450a9f2bd39bb6245e8182f4b095.tar.xz ceph-93ab1edd102a450a9f2bd39bb6245e8182f4b095.zip |
mds: don't roll back prepared table updates
When table server is recovering, it re-sends 'agree' messages for
prepared table updates. It is possible table client receives an
'agree' messages before it commits the corresponding update. Don't
send 'rollback' message back to the server in this case.
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
Diffstat (limited to 'src/mds/MDSTableServer.cc')
-rw-r--r-- | src/mds/MDSTableServer.cc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/mds/MDSTableServer.cc b/src/mds/MDSTableServer.cc index 00bea5e14f1..b7752468c24 100644 --- a/src/mds/MDSTableServer.cc +++ b/src/mds/MDSTableServer.cc @@ -120,10 +120,13 @@ void MDSTableServer::_commit_logged(MMDSTableRequest *req) void MDSTableServer::handle_rollback(MMDSTableRequest *req) { dout(7) << "handle_rollback " << *req << dendl; - _rollback(req->get_tid()); - _note_rollback(req->get_tid()); + + version_t tid = req->get_tid(); + assert(pending_for_mds.count(tid)); + _rollback(tid); + _note_rollback(tid); mds->mdlog->start_submit_entry(new ETableServer(table, TABLESERVER_OP_ROLLBACK, 0, -1, - req->get_tid(), version)); + tid, version)); req->put(); } |