Make testSortAndPaginateWithInProgress test stable#80530
Make testSortAndPaginateWithInProgress test stable#80530arteam merged 11 commits intoelastic:masterfrom
Conversation
Start asserting snapshots in progress only in case when they reach a stable state (the first index has finished, the second has been blocked). Fixes elastic#79779 Relates elastic#78507
|
Pinging @elastic/es-distributed (Team:Distributed) |
|
@elasticmachine update branch |
|
@elasticmachine update branch |
henningandersen
left a comment
There was a problem hiding this comment.
Left a couple of comments to ensure I understand the change correctly.
qa/smoke-test-http/src/test/java/org/elasticsearch/http/snapshots/RestGetSnapshotsIT.java
Outdated
Show resolved
Hide resolved
| .put("thread_pool.snapshot.core", 5) | ||
| .put("thread_pool.snapshot.max", 5) |
There was a problem hiding this comment.
Can you add a comment on why this need to be raised?
Also, I think 2 would be enough, 1 to be blocked for test-index-2 and one to ensure test-index-1 completes?
There was a problem hiding this comment.
I think you missed this comment?
There was a problem hiding this comment.
Sorry, I indeed missed it! I've moved LARGE_SNAPSHOT_POOL_SETTINGS to RestGetSnapshotsIT. I believe 2 is insufficient, the test hangs with 2 threads, but works with 3.
original-brownbear
left a comment
There was a problem hiding this comment.
I don't think this is enough unfortunately, see inline comment.
qa/smoke-test-http/src/test/java/org/elasticsearch/http/snapshots/RestGetSnapshotsIT.java
Outdated
Show resolved
Hide resolved
qa/smoke-test-http/src/test/java/org/elasticsearch/http/snapshots/RestGetSnapshotsIT.java
Outdated
Show resolved
Hide resolved
|
@elasticmachine update branch |
|
@elasticmachine update branch |
original-brownbear
left a comment
There was a problem hiding this comment.
I think the CS wait check can be simplified some more, other than that looks alright.
| e -> e.getKey().getIndexName().equals("test-index-1") == false | ||
| || e.getValue().state() == SnapshotsInProgress.ShardState.SUCCESS | ||
| ); | ||
| boolean secondIndexIsBlocked = state.custom(SnapshotsInProgress.TYPE, SnapshotsInProgress.EMPTY) |
There was a problem hiding this comment.
We shouldn't need this second check. If we make sure that all snapshots for index-1 are successful, then that should be the end state of things. The state of snapshots for the second index should be initialized to exactly what we're asserting here right away I think?
There was a problem hiding this comment.
@original-brownbear That was the original implementation (with only the test-index-1 check) and you suggested to add an addition check for the second index 😃
There was a problem hiding this comment.
I don't have a strong feeling towards this one way or another (the test passes on 100 iterations both with secondIndexIsBlocked check and without it).
There was a problem hiding this comment.
Right, now I remember :) Sorry about that.
|
@elasticmachine update branch |
|
@elasticmachine run elasticsearch-ci/eql-correctness |
|
@elasticmachine update |
original-brownbear
left a comment
There was a problem hiding this comment.
LGTM, sorry for the delay here
| e -> e.getKey().getIndexName().equals("test-index-1") == false | ||
| || e.getValue().state() == SnapshotsInProgress.ShardState.SUCCESS | ||
| ); | ||
| boolean secondIndexIsBlocked = state.custom(SnapshotsInProgress.TYPE, SnapshotsInProgress.EMPTY) |
There was a problem hiding this comment.
Right, now I remember :) Sorry about that.
|
Thanks @original-brownbear! |
Start asserting snapshots in progress only in case when they reach a stable state (the first index has finished, the second has been blocked). * Move LARGE_SNAPSHOT_SETTINGS to AbstractSnapshotRestTestCase to be reused * Check that test-index-2 is blocked * Be more clear that the 2nd index is blocked Fixes elastic#79779 Relates elastic#78507
Start asserting snapshots in progress only in case when they reach a stable state (the first index has finished, the second has been blocked). * Move LARGE_SNAPSHOT_SETTINGS to AbstractSnapshotRestTestCase to be reused * Check that test-index-2 is blocked * Be more clear that the 2nd index is blocked Fixes elastic#79779 Relates elastic#78507
Start asserting snapshots in progress only in case when they reach a stable state (the first index has finished, the second has been blocked). * Move LARGE_SNAPSHOT_SETTINGS to AbstractSnapshotRestTestCase to be reused * Check that test-index-2 is blocked * Be more clear that the 2nd index is blocked Fixes #79779 Relates #78507
…82759) Start asserting snapshots in progress only in case when they reach a stable state (the first index has finished, the second has been blocked). * Move LARGE_SNAPSHOT_SETTINGS to AbstractSnapshotRestTestCase to be reused * Check that test-index-2 is blocked * Be more clear that the 2nd index is blocked Fixes #79779 Relates #78507
Start asserting snapshots in progress only in case when they reach
a stable state (the first index has finished, the second has been
blocked).
Fixes #79779
Relates #78507