OPTION(mds_dump_cache_on_map, 0, OPT_BOOL, false),
OPTION(mds_dump_cache_after_rejoin, 0, OPT_BOOL, true),
OPTION(mds_hack_log_expire_for_better_stats, 0, OPT_BOOL, false),
+ OPTION(mds_kill_mdstable_at, 0, OPT_INT, 0),
OPTION(osd_data, 0, OPT_STR, ""),
OPTION(osd_journal, 0, OPT_STR, ""),
OPTION(osd_journal_size, 0, OPT_INT, 0), // in mb
bool mds_hack_log_expire_for_better_stats;
+ int mds_kill_mdstable_at; // non-zero to specify kill point
+
// osd
const char *osd_data;
const char *osd_journal;
case TABLESERVER_OP_AGREE:
if (pending_prepare.count(reqid)) {
dout(10) << "got agree on " << reqid << " atid " << tid << dendl;
+
+ assert(g_conf.mds_kill_mdstable_at != 3);
+
Context *onfinish = pending_prepare[reqid].onfinish;
*pending_prepare[reqid].ptid = tid;
if (pending_prepare[reqid].pbl)
case TABLESERVER_OP_ACK:
dout(10) << "got ack on tid " << tid << ", logging" << dendl;
+ assert(g_conf.mds_kill_mdstable_at != 7);
+
// remove from committing list
assert(pending_commit.count(tid));
assert(pending_commit[tid]->pending_commit_tids[table].count(tid));
{
dout(10) << "_logged_ack " << tid << dendl;
+ assert(g_conf.mds_kill_mdstable_at != 8);
+
assert(pending_commit.count(tid));
assert(pending_commit[tid]->pending_commit_tids[table].count(tid));
pending_commit[tid] = ls;
ls->pending_commit_tids[table].insert(tid);
+ assert(g_conf.mds_kill_mdstable_at != 4);
+
// send message
MMDSTableRequest *req = new MMDSTableRequest(table, TABLESERVER_OP_COMMIT, 0, tid);
mds->send_message_mds(req, mds->mdsmap->get_tableserver());
_prepare(req->bl, req->reqid, from);
_note_prepare(from, req->reqid);
+ assert(g_conf.mds_kill_mdstable_at != 1);
+
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!
mds->mdlog->submit_entry(le, new C_Prepare(this, req, version));
void MDSTableServer::_prepare_logged(MMDSTableRequest *req, version_t tid)
{
dout(7) << "_create_logged " << *req << " tid " << tid << dendl;
+
+ assert(g_conf.mds_kill_mdstable_at != 2);
+
MMDSTableRequest *reply = new MMDSTableRequest(table, TABLESERVER_OP_AGREE, req->reqid, tid);
reply->bl = req->bl;
mds->send_message_mds(reply, req->get_source().num());
version_t tid = req->tid;
if (pending_for_mds.count(tid)) {
+
+ assert(g_conf.mds_kill_mdstable_at != 5);
+
_commit(tid);
_note_commit(tid);
mds->mdlog->submit_entry(new ETableServer(table, TABLESERVER_OP_COMMIT, 0, -1, tid, version));
void MDSTableServer::_commit_logged(MMDSTableRequest *req)
{
dout(7) << "_commit_logged, sending ACK" << dendl;
+
+ assert(g_conf.mds_kill_mdstable_at != 6);
+
MMDSTableRequest *reply = new MMDSTableRequest(table, TABLESERVER_OP_ACK, req->reqid, req->tid);
mds->send_message_mds(reply, req->get_source().num());
delete req;