ReadOnly: clear out the tracking record once a revoke is completed 1.2-readonly-delegations-test
authorRonnie Sahlberg <ronniesahlberg@gmail.com>
Wed, 17 Aug 2011 06:14:57 +0000 (16:14 +1000)
committerRonnie Sahlberg <ronniesahlberg@gmail.com>
Wed, 17 Aug 2011 06:14:57 +0000 (16:14 +1000)
server/ctdb_call.c
server/ctdb_daemon.c

index ba4e7d32dafd4b4205519b37643c26c03f91d1f0..441544371ce33e654a40e7b22d88964d7fd2f76d 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 903033df1dbd7c3233cd7c5c74600f9808b3caa7..b3bb3c079ffc9c1a33a3e9f23f0a82a2c092975e 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