]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mds: make sure table request id unique
authorYan, Zheng <zheng.z.yan@intel.com>
Sat, 16 Mar 2013 00:02:18 +0000 (08:02 +0800)
committerGreg Farnum <greg@inktank.com>
Mon, 1 Apr 2013 16:16:48 +0000 (09:16 -0700)
commita5dce808b571533cedf519dfd3a375e423b23346
tree312c4a2ca8de8c3b45253dbda1bc3a98be0a14c6
parentbb83a5d63c238c27f3b496bb1be9aade2fbc4254
mds: make sure table request id unique

When a MDS becomes active, the table server re-sends 'agree' messages
for old prepared request. If the recoverd MDS starts a new table request
at the same time, The new request's ID can happen to be the same as old
prepared request's ID, because current table client code assigns request
ID from zero after MDS restarts.

This patch make table server send 'ready' messages when table clients
become active or itself becomes active. The 'ready' message updates
table client's last_reqid to avoid request ID collision. The message
also replaces the roles of finish_recovery() and handle_mds_recovery()
callbacks for table client.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
src/mds/MDS.cc
src/mds/MDSTableClient.cc
src/mds/MDSTableClient.h
src/mds/MDSTableServer.cc
src/mds/MDSTableServer.h
src/mds/mds_table_types.h