diff options
author | Amitay Isaacs <amitay@gmail.com> | 2014-04-23 18:02:39 +1000 |
---|---|---|
committer | Amitay Isaacs <amitay@samba.org> | 2014-12-05 17:06:58 +0100 |
commit | 959b9ea0ef85c57ffc84d66a6e5e855868943391 (patch) | |
tree | 1e6d44bf69d3198917c9769b958a127f4d5e09f3 | |
parent | 257311e337065f089df688cbf261d2577949203d (diff) | |
download | samba-959b9ea0ef85c57ffc84d66a6e5e855868943391.tar.gz samba-959b9ea0ef85c57ffc84d66a6e5e855868943391.tar.xz samba-959b9ea0ef85c57ffc84d66a6e5e855868943391.zip |
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 <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Autobuild-User(master): Amitay Isaacs <amitay@samba.org>
Autobuild-Date(master): Fri Dec 5 17:06:58 CET 2014 on sn-devel-104
-rw-r--r-- | ctdb/server/ctdb_recoverd.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/ctdb/server/ctdb_recoverd.c b/ctdb/server/ctdb_recoverd.c index fd07e64e23..f86f57e570 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); |