From: Ronnie Sahlberg Date: Wed, 17 Aug 2011 06:14:57 +0000 (+1000) Subject: ReadOnly: clear out the tracking record once a revoke is completed X-Git-Url: http://git.samba.org/?a=commitdiff_plain;h=7af255551f058d1f6bfdd38ca603e7a19d1bb7ba;p=rusty%2Fctdb.git ReadOnly: clear out the tracking record once a revoke is completed --- diff --git a/server/ctdb_call.c b/server/ctdb_call.c index 2df86b46..fbce276d 100644 --- a/server/ctdb_call.c +++ b/server/ctdb_call.c @@ -516,6 +516,10 @@ void ctdb_request_call(struct ctdb_context *ctdb, struct ctdb_req_header *hdr) if (ctdb_ltdb_store(ctdb_db, call->key, &header, data) != 0) { ctdb_fatal(ctdb, "Failed to write header with cleared REVOKE flag"); } + /* and clear out the tracking data */ + if (tdb_delete(ctdb_db->rottdb, call->key) != 0) { + DEBUG(DEBUG_ERR,(__location__ " Failed to clear out trackingdb record\n")); + } } /* if we are revoking, we must defer all other calls until the revoke diff --git a/server/ctdb_daemon.c b/server/ctdb_daemon.c index 2a5db64b..742170a6 100644 --- a/server/ctdb_daemon.c +++ b/server/ctdb_daemon.c @@ -434,6 +434,10 @@ static void daemon_request_call_from_client(struct ctdb_client *client, if (ctdb_ltdb_store(ctdb_db, key, &header, data) != 0) { ctdb_fatal(ctdb, "Failed to write header with cleared REVOKE flag"); } + /* and clear out the tracking data */ + if (tdb_delete(ctdb_db->rottdb, key) != 0) { + DEBUG(DEBUG_ERR,(__location__ " Failed to clear out trackingdb record\n")); + } } /* if we are revoking, we must defer all other calls until the revoke