Skip to content

Fix assertion in SnapshotShutdownIT.testSnapshotShutdownProgressTracker() #127998

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 4 commits into from
May 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions muted-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -417,9 +417,6 @@ tests:
- class: org.elasticsearch.action.admin.indices.diskusage.IndexDiskUsageAnalyzerTests
method: testKnnVectors
issue: https://github.com/elastic/elasticsearch/issues/127689
- class: org.elasticsearch.snapshots.SnapshotShutdownIT
method: testSnapshotShutdownProgressTracker
issue: https://github.com/elastic/elasticsearch/issues/127690
- class: org.elasticsearch.backwards.MixedClusterClientYamlTestSuiteIT
method: test {p0=search/350_point_in_time/point-in-time with index filter}
issue: https://github.com/elastic/elasticsearch/issues/127741
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ public void testShutdownWhileSuccessInFlight() throws Exception {
)
public void testSnapshotShutdownProgressTracker() throws Exception {
final var repoName = randomIdentifier();
final int numShards = randomIntBetween(1, 10);
final int numShards = randomIntBetween(1, 9);
createRepository(repoName, "mock");

// Create another index on another node which will be blocked (remain in state INIT) throughout.
Expand Down Expand Up @@ -540,12 +540,14 @@ public void testSnapshotShutdownProgressTracker() throws Exception {
mockLog.awaitAllExpectationsMatched();
resetMockLog();

// At least one shard reached the MockRepository's blocking code when waitForBlock was called. However, there's no guarantee that
// the other shards got that far before the shutdown flag was put in place, in which case the other shards may be paused instead.
mockLog.addExpectation(
new MockLog.SeenEventExpectation(
new MockLog.PatternSeenEventExpectation(
"SnapshotShutdownProgressTracker running number of snapshots",
SnapshotShutdownProgressTracker.class.getCanonicalName(),
Level.INFO,
"*Number shard snapshots running [" + numShards + "].*"
".+Number shard snapshots running \\[[1-" + numShards + "]].+"
)
);

Expand Down