persistent: reject trans3_control when a commit is already active.
authorMichael Adam <obnox@samba.org>
Tue, 22 Feb 2011 23:03:07 +0000 (00:03 +0100)
committerMichael Adam <obnox@samba.org>
Thu, 24 Feb 2011 09:32:00 +0000 (10:32 +0100)
This should actually never happen.

server/ctdb_persistent.c

index e299c9fac3ac659f0941edc0bbd12eab46caa76d..c7a53ca066f56b029b25593edf6bdf8768ae1578 100644 (file)
@@ -310,6 +310,14 @@ int32_t ctdb_control_trans3_commit(struct ctdb_context *ctdb,
                return -1;
        }
 
+       if (ctdb_db->persistent_state != NULL) {
+               DEBUG(DEBUG_ERR, (__location__ " Error: "
+                                 "ctdb_control_trans3_commit "
+                                 "called while a transaction commit is "
+                                 "active. db_id[0x%08x]\n", m->db_id));
+               return -1;
+       }
+
        client = ctdb_reqid_find(ctdb, c->client_id, struct ctdb_client);
        if (client == NULL) {
                DEBUG(DEBUG_ERR,(__location__ " can not match persistent_store "