Change in ovirt-engine[master]: core: do not ping too often

Moti Asayag 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 Signed-off-by: Martin Mucha <mmucha@redhat.com> --- M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/network/host/HostSetupNetworkPoller.java 1 file changed, 49 insertions(+), 17 deletions(-) Approvals: Martin Mucha: Verified Jenkins CI: Passed CI tests Moti Asayag: Looks good to me, approved -- To view, visit https://gerrit.ovirt.org/54644 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I2569376eae0b67591f669438a9742b34ba7ff568 Gerrit-PatchSet: 9 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Martin Mucha <mmucha@redhat.com> Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Marcin Mirecki <mmirecki@redhat.com> Gerrit-Reviewer: Martin Mucha <mmucha@redhat.com> Gerrit-Reviewer: Moti Asayag <masayag@redhat.com> Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczewski@gmail.com> Gerrit-Reviewer: Yevgeny Zaspitsky <yzaspits@redhat.com> Gerrit-Reviewer: gerrit-hooks <automation@ovirt.org>
participants (1)
-
masayag@redhat.com