Closed rahulkarajgikar closed 1 week ago
This flaky test relates to https://github.com/opensearch-project/OpenSearch/pull/13237 which introduced a new metric
type caches
to the node stats API, it will throw exception if the requested cache type is not valid:
https://github.com/opensearch-project/OpenSearch/blob/14f1c43c108f378b13d109ade364216c082fb858/server/src/main/java/org/opensearch/rest/action/admin/cluster/RestNodesStatsAction.java#L191
, but when the caches
metric is selected by the random method, it will enter this branch which handles caches
metric type separately:https://github.com/opensearch-project/OpenSearch/blob/14f1c43c108f378b13d109ade364216c082fb858/server/src/main/java/org/opensearch/rest/action/admin/cluster/RestNodesStatsAction.java#L179, so at this point, java.lang.IllegalArgumentException: request [/_nodes/stats] contains unrecognized cache type: [store]
will be thrown rather than request [/_nodes/stats] contains index metrics [store] but indices stats not requested
.
Describe the bug
Error Message
Stack Trace
Standard Output:
Standard Error:
Related component
Indexing
To Reproduce
CI - https://build.ci.opensearch.org/job/gradle-check/38104/testReport/junit/org.opensearch.rest.action.admin.cluster/RestNodesStatsActionTests/testIndexMetricsRequestWithoutIndicesMetric/
Expected behavior
Test should always pass
Additional Details
No response