[9.0] Fixes testSnapshotShutdownProgressTracker (#134926) #135415
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Backports #134926 to
9.0
I was able to reproduce the error by following the steps outlined by @JeremyDahlgren here
The error occurs due to the following sequence of events:
putShutdownForRemovalMetadata()
callPausedSnapshotException
, and then immediately notifies the master with the failureSnapshotShutdownProgressTracker
log messages are verified in the test and then themasterTransportService.addRequestHandlingBehavior()
is called to block the notificationsnodeForRemoval
, but by this time it is too late and one or more updates have already been sent, possibly leaving only the single blocked shard, causing the assertion at 581 to failThe proposed change:
n
shards onotherNode
with data. At the moment, there is only 1.A full explanation of the changes can be found here
Testing
./gradlew ":server:internalClusterTest" --tests "org.elasticsearch.snapshots.SnapshotShutdownIT.testSnapshotShutdownProgressTracker" -Dtests.seed=C44FB8C3BA8AC78E -Dtests.locale=dz -Dtests.timezone=Australia/Queensland -Druntime.java=23
succeedsResolves: #134620