From 498932c0e8e8614bd52f3270c4d63e2b5f9e26a4 Mon Sep 17 00:00:00 2001 From: Amitay Isaacs Date: Fri, 16 Feb 2018 17:01:21 +1100 Subject: [PATCH] ctdb-vacuum: Replace VACUUM_FETCH message with control Signed-off-by: Amitay Isaacs Reviewed-by: Martin Schwenke --- ctdb/server/ctdb_vacuum.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/ctdb/server/ctdb_vacuum.c b/ctdb/server/ctdb_vacuum.c index bdb00c3df0b..59fd1a54747 100644 --- a/ctdb/server/ctdb_vacuum.c +++ b/ctdb/server/ctdb_vacuum.c @@ -839,6 +839,7 @@ static void ctdb_process_vacuum_fetch_lists(struct ctdb_db_context *ctdb_db, { unsigned int i; struct ctdb_context *ctdb = ctdb_db->ctdb; + int ret, res; for (i = 0; i < ctdb->num_nodes; i++) { TDB_DATA data; @@ -857,17 +858,16 @@ static void ctdb_process_vacuum_fetch_lists(struct ctdb_db_context *ctdb_db, ctdb_db->db_name)); data = ctdb_marshall_finish(vfl); - if (ctdb_client_send_message(ctdb, ctdb->nodes[i]->pnn, - CTDB_SRVID_VACUUM_FETCH, - data) != 0) - { - DEBUG(DEBUG_ERR, (__location__ " Failed to send vacuum " - "fetch message to %u\n", + + ret = ctdb_control(ctdb, ctdb->nodes[i]->pnn, 0, + CTDB_CONTROL_VACUUM_FETCH, 0, + data, NULL, NULL, &res, NULL, NULL); + if (ret != 0 || res != 0) { + DEBUG(DEBUG_ERR, ("Failed to send vacuum " + "fetch control to node %u\n", ctdb->nodes[i]->pnn)); } } - - return; } /** @@ -1197,7 +1197,7 @@ fail: * - The vacuum_fetch lists * (one for each other lmaster node): * The records in this list are sent for deletion to - * their lmaster in a bulk VACUUM_FETCH message. + * their lmaster in a bulk VACUUM_FETCH control. * * The lmaster then migrates all these records to itelf * so that they can be vacuumed there.