Reduce growth rate of writer heartbeat interval

Based on a sense that perhaps the interval grows too quickly in
combination with network hiccups, combined with a suspicion that this
may be the cause of some test failures.

Signed-off-by: Erik Boasson <eb@ilities.com>
This commit is contained in:
Erik Boasson 2020-07-04 13:04:17 +02:00 committed by eboasson
parent e9463c57b2
commit d19dcbbd1a

View file

@ -86,10 +86,10 @@ int64_t writer_hbcontrol_intv (const struct writer *wr, const struct whc_state *
int64_t ret = gv->config.const_hb_intv_sched;
size_t n_unacked;
if (hbc->hbs_since_last_write > 2)
if (hbc->hbs_since_last_write > 5)
{
unsigned cnt = hbc->hbs_since_last_write;
while (cnt-- > 2 && 2 * ret < gv->config.const_hb_intv_sched_max)
unsigned cnt = (hbc->hbs_since_last_write - 5) / 2;
while (cnt-- != 0 && 2 * ret < gv->config.const_hb_intv_sched_max)
ret *= 2;
}