-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Provide repository-level stats for searchable snapshots #55051
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
|
Pinging @elastic/es-distributed (:Distributed/Snapshot/Restore) |
...rc/main/java/org/elasticsearch/xpack/searchablesnapshots/rest/RestRepositoryStatsAction.java
Show resolved
Hide resolved
original-brownbear
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.
Thanks Yannick, looks good in general only the test is broken and one suggestion to make this a little simpler maybe.
...epository-s3/src/test/java/org/elasticsearch/repositories/s3/S3BlobStoreRepositoryTests.java
Show resolved
Hide resolved
...epository-s3/src/test/java/org/elasticsearch/repositories/s3/S3BlobStoreRepositoryTests.java
Outdated
Show resolved
Hide resolved
...epository-s3/src/test/java/org/elasticsearch/repositories/s3/S3BlobStoreRepositoryTests.java
Show resolved
Hide resolved
plugins/repository-s3/src/main/java/org/elasticsearch/repositories/s3/S3BlobStore.java
Show resolved
Hide resolved
plugins/repository-s3/src/main/java/org/elasticsearch/repositories/s3/S3BlobContainer.java
Outdated
Show resolved
Hide resolved
tlrx
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.
I've left some comments, nothing to worry about
plugins/repository-s3/src/main/java/org/elasticsearch/repositories/s3/S3BlobStore.java
Outdated
Show resolved
Hide resolved
...epository-s3/src/test/java/org/elasticsearch/repositories/s3/S3BlobStoreRepositoryTests.java
Outdated
Show resolved
Hide resolved
...epository-s3/src/test/java/org/elasticsearch/repositories/s3/S3BlobStoreRepositoryTests.java
Show resolved
Hide resolved
...epository-s3/src/test/java/org/elasticsearch/repositories/s3/S3BlobStoreRepositoryTests.java
Show resolved
Hide resolved
server/src/main/java/org/elasticsearch/repositories/RepositoryStats.java
Outdated
Show resolved
Hide resolved
| if (clusterService.localNode().isMasterNode() == false && clusterService.localNode().isDataNode() == false) { | ||
| return new RepositoryStatsNodeResponse(clusterService.localNode(), RepositoryStats.EMPTY_STATS); | ||
| } | ||
| final Repository repository = repositoriesService.repository(request.getRepository()); |
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.
Should we catch the repository missing exception here - in case the repository is not yet known by this node - and return empty stats too?
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 would like to avoid that as it would then silently provide partial stats
|
@original-brownbear @tlrx thank you for the great reviews. I've addressed all comments. |
tlrx
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
original-brownbear
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, thanks @ywelsch !
Provides basic repository-level stats that will allow us to get some insight into how many requests are actually being made by the underlying SDK. Currently only tracks GET and LIST calls for S3 repositories. Most of the code is unfortunately boiler plate to add a new endpoint that will help us better understand some of the low-level dynamics of searchable snapshots.
Provides basic repository-level stats that will allow us to get some insight into how many requests are actually being made by the underlying SDK. Currently only tracks GET and LIST calls for S3 repositories. Most of the code is unfortunately boiler plate to add a new endpoint that will help us better understand some of the low-level dynamics of searchable snapshots.