Skip to content

Conversation

@joshua-adams-1
Copy link
Contributor

@joshua-adams-1 joshua-adams-1 commented Nov 10, 2025

Modifies the SnapshotShutdownProgressTracker to only log the periodic progress report while there are still snapshots left to process. This removes the existing behaviour where the report will log indefinitely, even once all snapshots are completed or paused.

Closes: ES-12794

Modifies the SnapshotShutdownProgressTracker to only log the periodic
progress report when there are still snapshots left to process. This
removes the existing behaviour where the report will log indefinitely,
even once all snapshots are completed or paused.

Closes: ES-12794
// Simulate starting shutdown -- should reset the completion stats and start logging
// Register each snapshot as in progress
for (int i = 0; i < 5; ++i) {
tracker.incNumberOfShardSnapshotsInProgress(dummyShardId, dummySnapshot);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This mimics production behaviour where snapshots are added to the tracker prior to the node shutting down. If I didn't, when calling tracker.onClusterStateAddShutdown(); the periodic logger would begin and then immediately end since there would be no in-progress snapshots

@joshua-adams-1 joshua-adams-1 self-assigned this Nov 10, 2025
@joshua-adams-1 joshua-adams-1 marked this pull request as ready for review November 10, 2025 15:50
@elasticsearchmachine elasticsearchmachine added the needs:triage Requires assignment of a team area label label Nov 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs:triage Requires assignment of a team area label v9.3.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants