Skip to content

Fix assertion in DiskThresholdDeciderIT.testRestoreSnapshotAllocationDoesNotExceedWatermarkWithMultipleRestores #127615

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

Merged
merged 2 commits into from
May 2, 2025

Conversation

JeremyDahlgren
Copy link
Contributor

The testRestoreSnapshotAllocationDoesNotExceedWatermarkWithMultipleRestores
test launches two concurrent restores and wants to verify that the node with limited disk space is only assigned a single shard from one of the indices. The test was asserting that it had one shard from the first index, but it is possible for it to get one shard from the index copy instead. This change allows the shard to be from either index, but still asserts there is only one assignment to the tiny node.

To reproduce the failure more reliably on my local machine I forced usableSpace = shardSizes.getSmallestShardSize() and indexRandom(true, indexName, 100) to build smaller shards and keep the usable space at the minimum.

Closes #127286

The test launches two concurrent restores and wants to verify that
the node with limited disk space is only assigned a single shard from
one of the indices.  The test was asserting that it had one shard from
the first index, but it is possible for it to get one shard from the
index copy instead.  This change allows the shard to be from either
index, but still asserts there is only one assignment to the tiny node.

Closes elastic#127286
@JeremyDahlgren JeremyDahlgren added >test Issues or PRs that are addressing/adding tests :Distributed Coordination/Allocation All issues relating to the decision making around placing a shard (both master logic & on the nodes) Team:Distributed Coordination Meta label for Distributed Coordination team v8.19.0 v9.1.0 v8.18.2 v9.0.2 labels May 1, 2025
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-distributed-coordination (Team:Distributed Coordination)

Copy link
Contributor

@nicktindall nicktindall left a comment

Choose a reason for hiding this comment

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

LGTM, nice work

@JeremyDahlgren JeremyDahlgren added the auto-backport Automatically create backport pull requests when merged label May 2, 2025
@JeremyDahlgren JeremyDahlgren merged commit 6263f44 into elastic:main May 2, 2025
17 checks passed
@elasticsearchmachine
Copy link
Collaborator

💔 Backport failed

Status Branch Result
8.19 Commit could not be cherrypicked due to conflicts
8.18 Commit could not be cherrypicked due to conflicts
9.0 Commit could not be cherrypicked due to conflicts

You can use sqren/backport to manually backport by running backport --upstream elastic/elasticsearch --pr 127615

@JeremyDahlgren
Copy link
Contributor Author

💚 All backports created successfully

Status Branch Result
8.18

Questions ?

Please refer to the Backport tool documentation

JeremyDahlgren added a commit to JeremyDahlgren/elasticsearch that referenced this pull request May 2, 2025
The test launches two concurrent restores and wants to verify that
the node with limited disk space is only assigned a single shard from
one of the indices.  The test was asserting that it had one shard from
the first index, but it is possible for it to get one shard from the
index copy instead.  This change allows the shard to be from either
index, but still asserts there is only one assignment to the tiny node.

Closes elastic#127286

(cherry picked from commit 6263f44)
@JeremyDahlgren
Copy link
Contributor Author

💚 All backports created successfully

Status Branch Result
8.19

Questions ?

Please refer to the Backport tool documentation

JeremyDahlgren added a commit to JeremyDahlgren/elasticsearch that referenced this pull request May 2, 2025
The test launches two concurrent restores and wants to verify that
the node with limited disk space is only assigned a single shard from
one of the indices.  The test was asserting that it had one shard from
the first index, but it is possible for it to get one shard from the
index copy instead.  This change allows the shard to be from either
index, but still asserts there is only one assignment to the tiny node.

Closes elastic#127286

(cherry picked from commit 6263f44)

# Conflicts:
#	muted-tests.yml
@JeremyDahlgren
Copy link
Contributor Author

💚 All backports created successfully

Status Branch Result
9.0

Questions ?

Please refer to the Backport tool documentation

JeremyDahlgren added a commit to JeremyDahlgren/elasticsearch that referenced this pull request May 2, 2025
The test launches two concurrent restores and wants to verify that
the node with limited disk space is only assigned a single shard from
one of the indices.  The test was asserting that it had one shard from
the first index, but it is possible for it to get one shard from the
index copy instead.  This change allows the shard to be from either
index, but still asserts there is only one assignment to the tiny node.

Closes elastic#127286

(cherry picked from commit 6263f44)

# Conflicts:
#	muted-tests.yml
JeremyDahlgren added a commit that referenced this pull request May 5, 2025
The test launches two concurrent restores and wants to verify that
the node with limited disk space is only assigned a single shard from
one of the indices.  The test was asserting that it had one shard from
the first index, but it is possible for it to get one shard from the
index copy instead.  This change allows the shard to be from either
index, but still asserts there is only one assignment to the tiny node.

Closes #127711

(cherry picked from commit 6263f44)
JeremyDahlgren added a commit that referenced this pull request May 5, 2025
The test launches two concurrent restores and wants to verify that
the node with limited disk space is only assigned a single shard from
one of the indices.  The test was asserting that it had one shard from
the first index, but it is possible for it to get one shard from the
index copy instead.  This change allows the shard to be from either
index, but still asserts there is only one assignment to the tiny node.

Closes #127286

(cherry picked from commit 6263f44)
JeremyDahlgren added a commit that referenced this pull request May 5, 2025
The test launches two concurrent restores and wants to verify that
the node with limited disk space is only assigned a single shard from
one of the indices.  The test was asserting that it had one shard from
the first index, but it is possible for it to get one shard from the
index copy instead.  This change allows the shard to be from either
index, but still asserts there is only one assignment to the tiny node.

Closes #127286

(cherry picked from commit 6263f44)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport Automatically create backport pull requests when merged :Distributed Coordination/Allocation All issues relating to the decision making around placing a shard (both master logic & on the nodes) Team:Distributed Coordination Meta label for Distributed Coordination team >test Issues or PRs that are addressing/adding tests v8.18.2 v8.19.0 v9.0.2 v9.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[CI] DiskThresholdDeciderIT testRestoreSnapshotAllocationDoesNotExceedWatermarkWithMultipleRestores failing
3 participants