Skip to content

Commit

Permalink
Add more logging for IndexRecoveryIT#testSourceThrottling (#122830)
Browse files Browse the repository at this point in the history
I couldn't reproduce the failure of the throttling time being zero on
the recovery target node. Added more logging for the stats in case of
failure.

Resolve #122712
  • Loading branch information
arteam authored Feb 18, 2025
1 parent befc6a0 commit 29cbbd9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
3 changes: 0 additions & 3 deletions muted-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -318,9 +318,6 @@ tests:
- class: org.elasticsearch.search.basic.SearchWithRandomDisconnectsIT
method: testSearchWithRandomDisconnects
issue: https://github.com/elastic/elasticsearch/issues/122707
- class: org.elasticsearch.indices.recovery.IndexRecoveryIT
method: testSourceThrottling
issue: https://github.com/elastic/elasticsearch/issues/122712
- class: org.elasticsearch.xpack.esql.action.EsqlActionBreakerIT
issue: https://github.com/elastic/elasticsearch/issues/122810
- class: org.elasticsearch.snapshots.DedicatedClusterSnapshotRestoreIT
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -342,9 +342,17 @@ public void assertNodeHasThrottleTimeAndNoRecoveries(String nodeName, Boolean is
assertThat(recoveryStats.currentAsSource(), equalTo(0));
assertThat(recoveryStats.currentAsTarget(), equalTo(0));
if (isRecoveryThrottlingNode) {
assertThat("Throttling should be >0 for '" + nodeName + "'", recoveryStats.throttleTime().millis(), greaterThan(0L));
assertThat(
"Throttling should be >0 for '" + nodeName + "'. Node stats: " + nodesStatsResponse,
recoveryStats.throttleTime().millis(),
greaterThan(0L)
);
} else {
assertThat("Throttling should be =0 for '" + nodeName + "'", recoveryStats.throttleTime().millis(), equalTo(0L));
assertThat(
"Throttling should be =0 for '" + nodeName + "'. Node stats: " + nodesStatsResponse,
recoveryStats.throttleTime().millis(),
equalTo(0L)
);
}
}

Expand Down

0 comments on commit 29cbbd9

Please sign in to comment.