diff options
author | Andrew Bartlett <abartlet@samba.org> | 2014-03-21 16:26:48 +1300 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2014-03-27 00:36:31 +0100 |
commit | 20a665ae09eb8d5affb88fe409a6130a74bd0aad (patch) | |
tree | 1bc1d244041ee123133fccfe3681ff357df180b9 | |
parent | 3d5b80f26ae65ce43ea25dd94274ec865f1c4026 (diff) | |
download | samba-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>
-rw-r--r-- | source4/dsdb/repl/replicated_objects.c | 14 |
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. |