Tal Nisan has submitted this change and it was merged.
Change subject: core: do not ping too often
......................................................................
core: do not ping too often
Code has a bug causing polling (with FutureVDSCommandType.Poll / ping
verb) too bursty when host is responding fast.
Changes:
1. method waitBetweenPolls is moved from end of method to the start.
When wait is needed, it's the first thing which is done.
2. field lastTimeBeforePoll is introduced. After waiting this field is
set with current time. In next execution, waitBetweenPolls will wait
if requested POLLING_BREAK is not met.
3. in waitBetweenPolls while is introduced, because Thread.sleep does
not guarantee to wait for requested time period, actually it may
sometimes return way sooner than that (see comment in method).
Not that important changes:
4. extracted reading value from task / handling timeouts to single
method for code clarity
5. added trace logging for next time this class misbehaves.
Change-Id: I2569376eae0b67591f669438a9742b34ba7ff568
Bug-Url:
https://bugzilla.redhat.com/1320606
Signed-off-by: Martin Mucha <mmucha(a)redhat.com>
---
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/network/host/HostSetupNetworkPoller.java
1 file changed, 48 insertions(+), 17 deletions(-)
Approvals:
Piotr Kliczewski: Looks good to me, but someone else must approve
Anton Marchukov: Verified
Alona Kaplan: Looks good to me, approved
Jenkins CI: Passed CI tests
--
To view, visit
https://gerrit.ovirt.org/55482
To unsubscribe, visit
https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I2569376eae0b67591f669438a9742b34ba7ff568
Gerrit-PatchSet: 5
Gerrit-Project: ovirt-engine
Gerrit-Branch: ovirt-engine-3.6
Gerrit-Owner: Martin Mucha <mmucha(a)redhat.com>
Gerrit-Reviewer: Alona Kaplan <alkaplan(a)redhat.com>
Gerrit-Reviewer: Anton Marchukov <amarchuk(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Eyal Edri <eedri(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczewski(a)gmail.com>
Gerrit-Reviewer: Tal Nisan <tnisan(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>