summaryrefslogtreecommitdiffstats
path: root/ctdb/server/ctdb_persistent.c
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2011-02-23 00:03:07 +0100
committerMichael Adam <obnox@samba.org>2011-02-24 10:35:25 +0100
commit65f7a449873dec21e2fa8af5d51a57c3a1c013a4 (patch)
tree2e21346e8cac0c429bc10ebca914c95c73a40d9b /ctdb/server/ctdb_persistent.c
parent01c2c0c26287febbb34274226bb6cec4dac6a936 (diff)
downloadsamba-65f7a449873dec21e2fa8af5d51a57c3a1c013a4.tar.gz
samba-65f7a449873dec21e2fa8af5d51a57c3a1c013a4.tar.xz
samba-65f7a449873dec21e2fa8af5d51a57c3a1c013a4.zip
persistent: reject trans3_control when a commit is already active.
This should actually never happen. (This used to be ctdb commit f416e76838fe2adf629d4356d1cc87054b1af164)
Diffstat (limited to 'ctdb/server/ctdb_persistent.c')
-rw-r--r--ctdb/server/ctdb_persistent.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/ctdb/server/ctdb_persistent.c b/ctdb/server/ctdb_persistent.c
index e299c9fac3..c7a53ca066 100644
--- a/ctdb/server/ctdb_persistent.c
+++ b/ctdb/server/ctdb_persistent.c
@@ -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 "