This is an automated email from the git hooks/post-receive script.
lkrispen pushed a commit to branch 389-ds-base-1.3.7
in repository 389-ds-base.
commit e82bba7e990aa299003c53ca92b2f913134f10a6
Author: Ludwig Krispenz <lkrispen(a)redhat.com>
Date: Wed Apr 4 08:59:15 2018 +0200
Ticket 49631 - same csn generated twice
Bug: if in the csn adjustment the local time was less or equal than the remote time
the sequence number has always been adjusted to remote++
but if the csn time was equal and the local seq number was larger the effect
was a reset of the csn generato.
Fix: correctly handles seqnum in csn adjustment
Reviewed by: Mark, thanks
---
ldap/servers/slapd/csngen.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/ldap/servers/slapd/csngen.c b/ldap/servers/slapd/csngen.c
index 4ac45ac..3afc917 100644
--- a/ldap/servers/slapd/csngen.c
+++ b/ldap/servers/slapd/csngen.c
@@ -338,7 +338,11 @@ csngen_adjust_time(CSNGen *gen, const CSN *csn)
we have increased the time, we can decrease the seqnum
and still guarantee that any new CSNs generated will be
any current CSNs we have generated */
-
gen->state.seq_num = remote_seqnum + 1;
+ if (remote_seqnum < gen->state.seq_num) {
+ gen->state.seq_num ++;
+ } else {
+ gen->state.seq_num = remote_seqnum + 1;
+ }
}
if (slapi_is_loglevel_set(SLAPI_LOG_REPL)) {
slapi_log_err(SLAPI_LOG_REPL, "csngen_adjust_time",
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.