Commit c2a62c39 authored by Martin Blix Grydeland's avatar Martin Blix Grydeland

Allow up to clock_step error when checking the session timestamps

When checking the timestamps on deleting a session, allow up to
clock_step seconds error before bailing.

Fixes: #1874
parent cdf7f5b8
......@@ -518,11 +518,15 @@ SES_Delete(struct sess *sp, enum sess_close reason, double now)
if (isnan(now))
now = VTIM_real();
AZ(isnan(sp->t_open));
if (now < sp->t_open) {
if (now + cache_param->clock_step < sp->t_open)
WRONG("Clock step detected");
now = sp->t_open; /* Do not log negatives */
}
if (reason == SC_NULL)
reason = (enum sess_close)-sp->fd;
assert(now >= sp->t_open);
assert(VTAILQ_EMPTY(&sp->privs->privs));
VSL(SLT_SessClose, sp->vxid, "%s %.3f",
sess_close_2str(reason, 0), now - sp->t_open);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment