mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
server:trans2_commit: move the check for active recovery down.
This needs to be done after the control-dispatcher: In the TRANS2_COMMIT control, the client->db_id needs to be set before bailing out, since otherwise the next TRANS2_COMMIT_RETRY will fail... Michael (This used to be ctdb commit 59faf3f923a5989b5ee94ef02a12827412775bae)
This commit is contained in:
parent
cc7438d87d
commit
c1039fba0e
@ -105,11 +105,6 @@ int32_t ctdb_control_trans2_commit(struct ctdb_context *ctdb,
|
||||
struct ctdb_marshall_buffer *m = (struct ctdb_marshall_buffer *)recdata.dptr;
|
||||
struct ctdb_db_context *ctdb_db;
|
||||
|
||||
if (ctdb->recovery_mode != CTDB_RECOVERY_NORMAL) {
|
||||
DEBUG(DEBUG_INFO,("rejecting ctdb_control_trans2_commit when recovery active\n"));
|
||||
return -1;
|
||||
}
|
||||
|
||||
ctdb_db = find_ctdb_db(ctdb, m->db_id);
|
||||
if (ctdb_db == NULL) {
|
||||
DEBUG(DEBUG_ERR,(__location__ " ctdb_control_trans2_commit: "
|
||||
@ -189,6 +184,11 @@ int32_t ctdb_control_trans2_commit(struct ctdb_context *ctdb,
|
||||
break;
|
||||
}
|
||||
|
||||
if (ctdb->recovery_mode != CTDB_RECOVERY_NORMAL) {
|
||||
DEBUG(DEBUG_INFO,("rejecting ctdb_control_trans2_commit when recovery active\n"));
|
||||
return -1;
|
||||
}
|
||||
|
||||
state = talloc_zero(ctdb, struct ctdb_persistent_state);
|
||||
CTDB_NO_MEMORY(ctdb, state);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user