Fix for:
CID
1297883 (#1 of 1): Result is not floating-point (UNINTENDED_INTEGER_DIVISION)
integer_division: Dividing integer expressions this->cct->_conf->osd_heartbeat_grace
and 2, and then converting the integer quotient to type double. Any remainder,
or fractional part of the quotient, is ignored.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
assert(heartbeat_lock.is_locked());
utime_t now = ceph_clock_now(cct);
double age = hbclient_messenger->get_dispatch_queue_max_age(now);
- if (age > (cct->_conf->osd_heartbeat_grace / 2)) {
+ if (age > ((double)cct->_conf->osd_heartbeat_grace / 2.0)) {
derr << "skipping heartbeat_check, hbqueue max age: " << age << dendl;
return; // hb dispatch is too backed up for our hb status to be meaningful
}