ReadOnly: clear out the tracking record once a revoke is completed
authorRonnie Sahlberg <ronniesahlberg@gmail.com>
Wed, 17 Aug 2011 06:14:57 +0000 (16:14 +1000)
committerRonnie Sahlberg <ronniesahlberg@gmail.com>
Tue, 23 Aug 2011 00:35:56 +0000 (10:35 +1000)
server/ctdb_call.c
server/ctdb_daemon.c

index 2df86b46c9474a3060e2ff1fdce9492c17ea51fd..fbce276df35924992550289f8f8dea905e02e159 100644 (file)
@@ -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
index 2a5db64bf421cbac2c63e55436a2f5142f3f67bd..742170a690c895ed98cc9ec749ed1fefae149617 100644 (file)
@@ -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