Add parameters to BlobStore#stats() request for different dimensions #126262
Labels
:Distributed Coordination/Snapshot/Restore
Anything directly related to the `_snapshot/*` APIs
Team:Distributed Coordination
Meta label for Distributed Coordination team
>tech debt
elasticsearch/server/src/main/java/org/elasticsearch/common/blobstore/BlobStore.java
Line 32 in 0586cbf
Map<String, BlobStoreActionStats> stats()
is an interface to get stats from the blob store for every repository implementation (S3, Azure, GCS). The problem with this API that it returns different keys depending on the environment. Specifically every cloud implementation checks if it's serverless:S3:
Azure:
GCS:
And outcome of API will be different. In stateful
Map<Operation, BlobStoreActionStats>
and serverlessMap<OperationPurpose_Operation, BlobStoreActionStats>
. So serverless returns two dimensional data, every pair of purpose and operation. Caller of this API needs to know how to deal with different outputs.We need to change API so it accepts arguments that describe what kind of stats caller needs. For example, which dimensions OperationPurpose, Operation, or maybe both
stats(List<Dimensions>)
or more rigidstats(boolean withOperationPurpose)
. Also remove serverless flag.The text was updated successfully, but these errors were encountered: