summaryrefslogtreecommitdiffstats
path: root/source4/dsdb/repl/replicated_objects.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2014-03-21 16:26:48 +1300
committerAndrew Bartlett <abartlet@samba.org>2014-03-27 00:36:31 +0100
commit20a665ae09eb8d5affb88fe409a6130a74bd0aad (patch)
tree1bc1d244041ee123133fccfe3681ff357df180b9 /source4/dsdb/repl/replicated_objects.c
parent3d5b80f26ae65ce43ea25dd94274ec865f1c4026 (diff)
downloadsamba-20a665ae09eb8d5affb88fe409a6130a74bd0aad.tar.gz
samba-20a665ae09eb8d5affb88fe409a6130a74bd0aad.tar.xz
samba-20a665ae09eb8d5affb88fe409a6130a74bd0aad.zip
dsdb: Do not update notify_uSN until the transaction is genuinely committed to the DB
Signed-off-by: Andrew Bartlett <abartlet@samba.org> Change-Id: I734bc75ed348de8f0a5ff92e18e08de2340b8951 Reviewed-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'source4/dsdb/repl/replicated_objects.c')
-rw-r--r--source4/dsdb/repl/replicated_objects.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/source4/dsdb/repl/replicated_objects.c b/source4/dsdb/repl/replicated_objects.c
index d1d69fa8f8..97b8b2a7a3 100644
--- a/source4/dsdb/repl/replicated_objects.c
+++ b/source4/dsdb/repl/replicated_objects.c
@@ -834,13 +834,6 @@ WERROR dsdb_replicated_objects_commit(struct ldb_context *ldb,
return WERR_FOOBAR;
}
- /* if this replication partner didn't need to be notified
- before this transaction then it still doesn't need to be
- notified, as the changes came from this server */
- if (seq_num2 > seq_num1 && seq_num1 <= *notify_uSN) {
- *notify_uSN = seq_num2;
- }
-
ret = ldb_transaction_commit(ldb);
if (ret != LDB_SUCCESS) {
/* restore previous schema */
@@ -854,6 +847,13 @@ WERROR dsdb_replicated_objects_commit(struct ldb_context *ldb,
return WERR_FOOBAR;
}
+ /* if this replication partner didn't need to be notified
+ before this transaction then it still doesn't need to be
+ notified, as the changes came from this server */
+ if (seq_num2 > seq_num1 && seq_num1 <= *notify_uSN) {
+ *notify_uSN = seq_num2;
+ }
+
/*
* Reset the Schema used by ldb. This will lead to
* a schema cache being refreshed from database.