1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-02 09:47:23 +03:00

ctdb-recovery: Fetched vnnmap is never used, so don't fetch it

New vnnmap is constructed using the information from all the connected
nodes.  So there is no need to fetch the vnnmap from recovery master.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14294

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
This commit is contained in:
Amitay Isaacs 2020-03-02 13:59:42 +11:00 committed by Martin Schwenke
parent 1114b02a72
commit 072ff4d12b

View File

@ -2048,7 +2048,6 @@ static bool db_recovery_recv(struct tevent_req *req, unsigned int *count)
*
* - Get tunables
* - Get nodemap
* - Get vnnmap
* - Get capabilities from all nodes
* - Get dbmap
* - Set RECOVERY_ACTIVE
@ -2076,7 +2075,6 @@ struct recovery_state {
static void recovery_tunables_done(struct tevent_req *subreq);
static void recovery_nodemap_done(struct tevent_req *subreq);
static void recovery_vnnmap_done(struct tevent_req *subreq);
static void recovery_capabilities_done(struct tevent_req *subreq);
static void recovery_dbmap_done(struct tevent_req *subreq);
static void recovery_active_done(struct tevent_req *subreq);
@ -2199,43 +2197,6 @@ static void recovery_nodemap_done(struct tevent_req *subreq)
return;
}
ctdb_req_control_getvnnmap(&request);
subreq = ctdb_client_control_send(state, state->ev, state->client,
state->destnode, TIMEOUT(),
&request);
if (tevent_req_nomem(subreq, req)) {
return;
}
tevent_req_set_callback(subreq, recovery_vnnmap_done, req);
}
static void recovery_vnnmap_done(struct tevent_req *subreq)
{
struct tevent_req *req = tevent_req_callback_data(
subreq, struct tevent_req);
struct recovery_state *state = tevent_req_data(
req, struct recovery_state);
struct ctdb_reply_control *reply;
struct ctdb_req_control request;
bool status;
int ret;
status = ctdb_client_control_recv(subreq, &ret, state, &reply);
TALLOC_FREE(subreq);
if (! status) {
D_ERR("control GETVNNMAP failed to node %u, ret=%d\n",
state->destnode, ret);
tevent_req_error(req, ret);
return;
}
ret = ctdb_reply_control_getvnnmap(reply, state, &state->vnnmap);
if (ret != 0) {
D_ERR("control GETVNNMAP failed, ret=%d\n", ret);
tevent_req_error(req, ret);
return;
}
ctdb_req_control_get_capabilities(&request);
subreq = ctdb_client_control_multi_send(state, state->ev,
state->client,
@ -2435,7 +2396,6 @@ static void recovery_active_done(struct tevent_req *subreq)
vnnmap->generation = state->generation;
talloc_free(state->vnnmap);
state->vnnmap = vnnmap;
ctdb_req_control_start_recovery(&request);