-
Notifications
You must be signed in to change notification settings - Fork 25.6k
GCS blob store: add OperationPurpose/Operation stats counters #122991
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
...-gcs/src/main/java/org/elasticsearch/repositories/gcs/GoogleCloudStorageOperationsStats.java
Outdated
Show resolved
Hide resolved
...-gcs/src/main/java/org/elasticsearch/repositories/gcs/GoogleCloudStorageOperationsStats.java
Show resolved
Hide resolved
nicktindall
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
...sitory-gcs/src/main/java/org/elasticsearch/repositories/gcs/GoogleCloudStorageBlobStore.java
Outdated
Show resolved
Hide resolved
...s/src/main/java/org/elasticsearch/repositories/gcs/GoogleCloudStorageHttpStatsCollector.java
Outdated
Show resolved
Hide resolved
|
Pinging @elastic/es-distributed-coordination (Team:Distributed Coordination) |
|
Hi @mhl-b, I've created a changelog YAML for you. |
|
@nicktindall , please take a look at the last commit a5549e4 I updated CAS test, added assertion for ignored request, and minor refactor in the test code. |
.../test/java/org/elasticsearch/repositories/gcs/GoogleCloudStorageBlobContainerStatsTests.java
Outdated
Show resolved
Hide resolved
nicktindall
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
| this.statsTracker = statsTracker; | ||
| var respCode = response.getStatusCode(); | ||
| // Some of the intermediate and error codes are still counted as "good" requests | ||
| if (((respCode >= 200 && respCode < 300) || respCode == 308 || respCode == 404) == false) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: for the first condition we could use org.elasticsearch.rest.RestStatus#isSuccessful, that logic was repeated in lots of places. Unless you think that obscures it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's more readable in this form since multiple codes are handled. I'm more concerned about codes I dont handle here, but we would like to.
| this.tracker = new ServerlessTracker(bucketName); | ||
| } else { | ||
| this.tracker = new StatefulTracker(); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like!
nicktindall
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice
Add counters for operations and requests for each combination of OperationPurpose and Operation for GCS blob store. Align with other BlobStore implementations (AWS and Azure).
Refactored
GoogleCloudStorageHttpStatsCollector. Removed indirection oftrackersandtrackerFactories.ES-10213
ES-10863