diff --git a/muted-tests.yml b/muted-tests.yml index 44ed9803f66f8..fc0ac4a058493 100644 --- a/muted-tests.yml +++ b/muted-tests.yml @@ -515,9 +515,6 @@ tests: - class: org.elasticsearch.xpack.sql.action.SqlSearchPageTimeoutIT method: testSearchContextIsCleanedUpAfterPageTimeoutForAggregationQueries issue: https://github.com/elastic/elasticsearch/issues/132619 -- class: org.elasticsearch.repositories.SnapshotMetricsIT - method: testSnapshotAPMMetrics - issue: https://github.com/elastic/elasticsearch/issues/132672 - class: org.elasticsearch.xpack.ml.integration.TextEmbeddingQueryIT method: testHybridSearch issue: https://github.com/elastic/elasticsearch/issues/132703 diff --git a/server/src/main/java/org/elasticsearch/snapshots/SnapshotsService.java b/server/src/main/java/org/elasticsearch/snapshots/SnapshotsService.java index 87ba959b0ebf2..f28d4948f657a 100644 --- a/server/src/main/java/org/elasticsearch/snapshots/SnapshotsService.java +++ b/server/src/main/java/org/elasticsearch/snapshots/SnapshotsService.java @@ -1232,7 +1232,6 @@ protected void doRun() { () -> snapshotListeners.addListener(new ActionListener<>() { @Override public void onResponse(List> actionListeners) { - SnapshotsServiceUtils.completeListenersIgnoringException(actionListeners, snapshotInfo); final Map attributesWithState = Maps.copyMapWithAddedEntry( SnapshotMetrics.createAttributesMap(snapshot.getProjectId(), repo.getMetadata()), "state", @@ -1241,6 +1240,7 @@ public void onResponse(List> actionListeners) { snapshotMetrics.snapshotsCompletedCounter().incrementBy(1, attributesWithState); snapshotMetrics.snapshotsDurationHistogram() .record((snapshotInfo.endTime() - snapshotInfo.startTime()) / 1_000.0, attributesWithState); + SnapshotsServiceUtils.completeListenersIgnoringException(actionListeners, snapshotInfo); logger.info("snapshot [{}] completed with state [{}]", snapshot, snapshotInfo.state()); }