From 7af255551f058d1f6bfdd38ca603e7a19d1bb7ba Mon Sep 17 00:00:00 2001 From: Ronnie Sahlberg Date: Wed, 17 Aug 2011 16:14:57 +1000 Subject: [PATCH] ReadOnly: clear out the tracking record once a revoke is completed --- server/ctdb_call.c | 4 ++++ server/ctdb_daemon.c | 4 ++++ 2 files changed, 8 insertions(+) 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 -- 2.34.1