Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Properly wait for recovery to finish #800

Conversation

danielmitterdorfer
Copy link
Member

With this commit we ensure that a proper schedule is chosen when waiting
for shard recovery to finish. We also ensure that a short time-span where no
recoveries are active (but more might continue soon) is not mistakenly
treated as a condition where all recoveries have already finished.

Closes #796

With this commit we ensure that a proper schedule is chosen when waiting
for shard recovery to finish. We also ensure that a short time-span where no
recoveries are active (but more might continue soon) is not mistakenly
treated as a condition where all recoveries have already finished.

Closes elastic#796
@danielmitterdorfer danielmitterdorfer added bug Something's wrong :Load Driver Changes that affect the core of the load driver such as scheduling, the measurement approach etc. labels Oct 17, 2019
@danielmitterdorfer danielmitterdorfer added this to the 1.4.0 milestone Oct 17, 2019
@danielmitterdorfer danielmitterdorfer self-assigned this Oct 17, 2019
With the operation ``wait-for-recovery`` you can wait until an ongoing index recovery finishes. The ``wait-for-recovery`` operation does not support any parameters.
With the operation ``wait-for-recovery`` you can wait until an ongoing shard recovery finishes. The ``wait-for-recovery`` operation supports the following parameters:

* ``completion-recheck-attempts`` (optional, defaults to 3): It might be possible that the `index recovery API <https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-recovery.html>`_ reports that there are no active shard recoveries when a new one might be scheduled shortly afterwards. Therefore, this operation will check several times whether there are still no active recoveries. In between those attempts, it will wait for a time period specified by ``completion-recheck-wait-period``.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/It might/It's

Copy link
Contributor

@dliappis dliappis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing the operation!

I think that there are some tests that will fail if this gets merged onto the current master due to the fixes in #801

e.g. https://github.com/elastic/rally/pull/800/files#diff-ec2b07b543fca9aae6cbecf501cfe53aL227

fails with

E       TypeError: 'ScheduleHandle' object is not iterable

(2.0, metrics.SampleType.Normal, None, {"body": ["a"]}),
(3.0, metrics.SampleType.Normal, None, {"body": ["a"]}),
(4.0, metrics.SampleType.Normal, None, {"body": ["a"]}),
], invocations, infinite_schedule=True)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that when we merge this to current master it's going to fail due to https://github.com/elastic/rally/pull/801/files

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! I've merged master and changed the test now in 78235be.

Copy link
Contributor

@dliappis dliappis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM thanks!

@danielmitterdorfer danielmitterdorfer merged commit 2e2d947 into elastic:master Oct 21, 2019
@danielmitterdorfer danielmitterdorfer deleted the schedule-for-progress-runners branch October 21, 2019 06:43
dliappis added a commit to dliappis/rally that referenced this pull request Nov 15, 2019
To run an operation every 10s we specify target-interval rather than
target-throughput.

Relates elastic#800
dliappis added a commit that referenced this pull request Nov 15, 2019
To run an operation every 10s we specify target-interval rather than
target-throughput.

Relates #800
Relates #817
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something's wrong :Load Driver Changes that affect the core of the load driver such as scheduling, the measurement approach etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

IndicesRecovery runner runs with 1 iteration and ends abruptly
2 participants