summaryrefslogtreecommitdiff
path: root/source4/dsdb/repl/drepl_out_pull.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_out_pull.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_out_pull.c')
-rw-r--r--source4/dsdb/repl/drepl_out_pull.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source4/dsdb/repl/drepl_out_pull.c b/source4/dsdb/repl/drepl_out_pull.c
index 3e59ee95ac..0af232c67f 100644
--- a/source4/dsdb/repl/drepl_out_pull.c
+++ b/source4/dsdb/repl/drepl_out_pull.c
@@ -52,6 +52,7 @@ WERROR dreplsrv_schedule_partition_pull_source(struct dreplsrv_service *s,
op->fsmo_info = fsmo_info;
op->callback = callback;
op->cb_data = cb_data;
+ op->schedule_time = time(NULL);
DLIST_ADD_END(s->ops.pending, op, struct dreplsrv_out_operation *);
@@ -126,17 +127,16 @@ done:
talloc_free(op);
s->ops.current = NULL;
dreplsrv_run_pending_ops(s);
- dreplsrv_notify_run_ops(s);
}
-void dreplsrv_run_pending_ops(struct dreplsrv_service *s)
+void dreplsrv_run_pull_ops(struct dreplsrv_service *s)
{
struct dreplsrv_out_operation *op;
time_t t;
NTTIME now;
struct tevent_req *subreq;
- if (s->ops.current || s->ops.n_current) {
+ if (s->ops.current) {
/* if there's still one running, we're done */
return;
}