vacuum: reset the fast path count in the event handle if it exceeds the limit.
authorMichael Adam <obnox@samba.org>
Mon, 20 Dec 2010 16:54:04 +0000 (17:54 +0100)
committerStefan Metzmacher <metze@samba.org>
Mon, 18 Apr 2011 15:24:27 +0000 (17:24 +0200)
similar to commit 91e6d36a190b1c9e4c8b18f7833e51c5c9a67574.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
server/ctdb_vacuum.c

index 1b9aff2169c1c5abc9584b7a38b0426ac3e1f1e0..35f8c583e9e7b72cbdf5a703c3fbb86eeb9328ff 100644 (file)
@@ -1017,6 +1017,10 @@ ctdb_vacuum_event(struct event_context *ev, struct timed_event *te,
                return;
        }
 
+       if (vacuum_handle->fast_path_count > ctdb->tunable.vacuum_fast_path_count) {
+               vacuum_handle->fast_path_count = 0;
+       }
+
        child_ctx->child_pid = fork();
        if (child_ctx->child_pid == (pid_t)-1) {
                close(child_ctx->fd[0]);