File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
modules/repository-s3/src/main/java/org/elasticsearch/repositories/s3 Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -576,11 +576,13 @@ static Operation parse(String s) {
576576 "CompleteMultipartUpload"
577577 )::contains ;
578578
579+ private static final Predicate <String > IS_LIST_OPERATION = Set .of ("ListObjects" , "ListObjectsV2" , "ListMultipartUploads" )::contains ;
580+
579581 boolean assertConsistentOperationName (MetricCollection metricCollection ) {
580582 final var operationNameMetrics = metricCollection .metricValues (CoreMetric .OPERATION_NAME );
581583 assert operationNameMetrics .size () == 1 : operationNameMetrics ;
582584 final Predicate <String > expectedOperationPredicate = switch (this ) {
583- case LIST_OBJECTS -> "ListObjectsV2" :: equals ;
585+ case LIST_OBJECTS -> IS_LIST_OPERATION ;
584586 case PUT_MULTIPART_OBJECT -> IS_PUT_MULTIPART_OPERATION ;
585587 case ABORT_MULTIPART_OBJECT -> "AbortMultipartUpload" ::equals ;
586588 default -> key ::equals ;
You can’t perform that action at this time.
0 commit comments