summaryrefslogtreecommitdiff
path: root/source4/dsdb/repl/drepl_notify.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-11-17 23:12:10 +1100
committerAndrew Tridgell <tridge@samba.org>2010-11-17 23:55:39 +1100
commit73016ad40523d4d41114c7b4d6bb2a46815bb597 (patch)
tree2e4e10cac687b70667530e84efc21d68119db747 /source4/dsdb/repl/drepl_notify.c
parente17ea9f3f5019cd95ace6920ba73129cda0adf55 (diff)
downloadsamba-73016ad40523d4d41114c7b4d6bb2a46815bb597.tar.gz
samba-73016ad40523d4d41114c7b4d6bb2a46815bb597.tar.bz2
samba-73016ad40523d4d41114c7b4d6bb2a46815bb597.zip
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
Diffstat (limited to 'source4/dsdb/repl/drepl_notify.c')
-rw-r--r--source4/dsdb/repl/drepl_notify.c4
1 files changed, 2 insertions, 2 deletions
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);
}