This is an automated email from the git hooks/post-receive script.
lkrispen pushed a commit to branch 389-ds-base-1.3.9
in repository 389-ds-base.
The following commit(s) were added to refs/heads/389-ds-base-1.3.9 by this push:
new 68f791e Ticket 50265: the warning about skew time could last forever
68f791e is described below
commit 68f791e9a3b6ee77185c74845c4d967eb67e8aa0
Author: Ludwig Krispenz <lkrispen(a)redhat.com>
AuthorDate: Wed Mar 20 12:00:42 2019 +0100
Ticket 50265: the warning about skew time could last forever
Bug: if the local system time is set back more than 300 seconds
a worning about too much time skew is logged and the sampled
time is updated. This adjustment is done at every write operation
and can increase the time skew and be logged infinitely
Fix: the intention of the adjustment was to avoid a roll over of seq_num
if the sampled time is not increased for more than 65k oberations.
But this is already handled with an explicite check for seq_num
rollover. The extra adjustment for negative time skew can be removed.
Reviewed by: Thierry, William. Thanks.
---
ldap/servers/slapd/csngen.c | 22 +++++++---------------
1 file changed, 7 insertions(+), 15 deletions(-)
diff --git a/ldap/servers/slapd/csngen.c b/ldap/servers/slapd/csngen.c
index 3afc917..68dbbda 100644
--- a/ldap/servers/slapd/csngen.c
+++ b/ldap/servers/slapd/csngen.c
@@ -191,22 +191,14 @@ csngen_new_csn(CSNGen *gen, CSN **csn, PRBool notify)
slapi_rwlock_unlock(gen->lock);
return rc;
}
- } else if (delta < -300) {
- /*
- * The maxseqnum could support up to 65535 CSNs per second.
- * That means that we could avoid duplicated CSN's for
- * delta up to 300 secs if update rate is 200/sec (usually
- * the max rate is below 20/sec).
- * Beyond 300 secs, we advance gen->state.sampled_time by
- * one sec to recycle seqnum.
- */
- slapi_log_err(SLAPI_LOG_WARNING, "csngen_new_csn", "Too much time
skew (%d secs). Current seqnum=%0x\n", delta, gen->state.seq_num);
- rc = _csngen_adjust_local_time(gen, gen->state.sampled_time + 1);
- if (rc != CSN_SUCCESS) {
- slapi_rwlock_unlock(gen->lock);
- return rc;
- }
}
+ /* if (delta < 0) this means the local system time was set back
+ * the new csn will be generated based on sampled time, which is
+ * ahead of system time and previously generated csns.
+ * the time stamp of the csn will not change until system time
+ * catches up or is corrected by remote csns.
+ * But we need to ensure that the seq_num does not overflow.
+ */
if (gen->state.seq_num == CSN_MAX_SEQNUM) {
slapi_log_err(SLAPI_LOG_INFO, "csngen_new_csn", "Sequence
rollover; "
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
Show replies by thread