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)
committerMichael Adam <obnox@samba.org>
Wed, 9 Mar 2011 23:37:02 +0000 (00:37 +0100)
server/ctdb_vacuum.c

index 946aa322a398e66aaa0904042f4bf9d43439aa5f..b6fff1e3405af4b3ce0f011a79a587202676b470 100644 (file)
@@ -1029,6 +1029,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 = ctdb_fork(ctdb);
        if (child_ctx->child_pid == (pid_t)-1) {
                close(child_ctx->fd[0]);