From 959b9ea0ef85c57ffc84d66a6e5e855868943391 Mon Sep 17 00:00:00 2001 From: Amitay Isaacs Date: Wed, 23 Apr 2014 18:02:39 +1000 Subject: [PATCH] ctdb-recoverd: Process all the records for vacuum fetch in a loop Processing one migration request at a time is very slow and processing a batch of records can take longer than VacuumInterval. This causes subsequent vacuum fetch requests to be dropped. The dropped records can accumulate quickly and will cause the vacuum database traverse to be quite expensive. Signed-off-by: Amitay Isaacs Reviewed-by: Martin Schwenke Autobuild-User(master): Amitay Isaacs Autobuild-Date(master): Fri Dec 5 17:06:58 CET 2014 on sn-devel-104 --- ctdb/server/ctdb_recoverd.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/ctdb/server/ctdb_recoverd.c b/ctdb/server/ctdb_recoverd.c index fd07e64e237..f86f57e570d 100644 --- a/ctdb/server/ctdb_recoverd.c +++ b/ctdb/server/ctdb_recoverd.c @@ -910,9 +910,7 @@ static void vacuum_fetch_next(struct vacuum_info *v); */ static void vacuum_fetch_callback(struct ctdb_client_call_state *state) { - struct vacuum_info *v = talloc_get_type(state->async.private_data, struct vacuum_info); talloc_free(state); - vacuum_fetch_next(v); } @@ -977,8 +975,7 @@ static void vacuum_fetch_next(struct vacuum_info *v) return; } state->async.fn = vacuum_fetch_callback; - state->async.private_data = v; - return; + state->async.private_data = NULL; } talloc_free(v); -- 2.11.4.GIT