Skip to content

Conversation

JeremyDahlgren
Copy link
Contributor

Adds an assertBusy() to testSnapshotAPMMetrics() to ensure the snapshot finalization code has had a chance to run and update the snapshot completed metrics.

The awaitNumberOfSnapshotsInProgress(0) call returns after it observes the expected SnapshotsInProgress cluster state update, but the snapshot finalization code may not have been executed yet.

The change in #132686 only reduced the race condition window.

Resolves: #132731

Adds an assertBusy() to testSnapshotAPMMetrics() to ensure
the snapshot finalization code has had a chance to run and
update the snapshot completed metrics.

The awaitNumberOfSnapshotsInProgress(0) call returns after
it observes the expected SnapshotsInProgress cluster state
update, but the snapshot finalization code may not have
been executed yet.

Resolves: elastic#132731
@JeremyDahlgren JeremyDahlgren added >test Issues or PRs that are addressing/adding tests :Distributed Coordination/Snapshot/Restore Anything directly related to the `_snapshot/*` APIs Team:Distributed Coordination Meta label for Distributed Coordination team v9.2.0 labels Aug 12, 2025
@JeremyDahlgren JeremyDahlgren marked this pull request as ready for review August 12, 2025 19:23
@elasticsearchmachine
Copy link
Collaborator

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

@JeremyDahlgren JeremyDahlgren enabled auto-merge (squash) August 12, 2025 19:35
@JeremyDahlgren
Copy link
Contributor Author

Per discussions with Nick and Josh I'm closing this in favor of Nick's PR #132780 that does further refactoring, splitting the throttling testing into a separate test method.

auto-merge was automatically disabled August 14, 2025 14:27

Pull request was closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Distributed Coordination/Snapshot/Restore Anything directly related to the `_snapshot/*` APIs Team:Distributed Coordination Meta label for Distributed Coordination team >test Issues or PRs that are addressing/adding tests v9.2.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[CI] SnapshotMetricsIT testSnapshotAPMMetrics failing
2 participants