From 73016ad40523d4d41114c7b4d6bb2a46815bb597 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 17 Nov 2010 23:12:10 +1100 Subject: s4-repl: ensure we don't starve pending replication ops when there was a continuous sequence of notify ops, we could leave the replication ops starving. This ensures we run whichever was queued first --- source4/dsdb/repl/drepl_notify.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source4/dsdb/repl/drepl_notify.c') diff --git a/source4/dsdb/repl/drepl_notify.c b/source4/dsdb/repl/drepl_notify.c index 0178e97e55..25378129da 100644 --- a/source4/dsdb/repl/drepl_notify.c +++ b/source4/dsdb/repl/drepl_notify.c @@ -228,7 +228,7 @@ static void dreplsrv_notify_op_callback(struct tevent_req *subreq) talloc_free(op); s->ops.n_current = NULL; - dreplsrv_notify_run_ops(s); + dreplsrv_run_pending_ops(s); } /* @@ -343,6 +343,7 @@ static WERROR dreplsrv_schedule_notify_sync(struct dreplsrv_service *service, op->uSN = uSN; op->is_urgent = is_urgent; op->replica_flags = replica_flags; + op->schedule_time = time(NULL); DLIST_ADD_END(service->ops.notifies, op, struct dreplsrv_notify_operation *); talloc_steal(service, op); @@ -499,5 +500,4 @@ static void dreplsrv_notify_run(struct dreplsrv_service *service) talloc_free(mem_ctx); dreplsrv_run_pending_ops(service); - dreplsrv_notify_run_ops(service); } -- cgit