Provide repository-level stats for searchable snapshots#55051
Merged
ywelsch merged 6 commits intoelastic:masterfrom Apr 14, 2020
Merged
Provide repository-level stats for searchable snapshots#55051ywelsch merged 6 commits intoelastic:masterfrom
ywelsch merged 6 commits intoelastic:masterfrom
Conversation
Collaborator
|
Pinging @elastic/es-distributed (:Distributed/Snapshot/Restore) |
...rc/main/java/org/elasticsearch/xpack/searchablesnapshots/rest/RestRepositoryStatsAction.java
Show resolved
Hide resolved
original-brownbear
suggested changes
Apr 10, 2020
Contributor
original-brownbear
left a comment
There was a problem hiding this comment.
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
reviewed
Apr 14, 2020
Member
tlrx
left a comment
There was a problem hiding this comment.
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()); |
Member
There was a problem hiding this comment.
Should we catch the repository missing exception here - in case the repository is not yet known by this node - and return empty stats too?
Contributor
Author
There was a problem hiding this comment.
I would like to avoid that as it would then silently provide partial stats
Contributor
Author
|
@original-brownbear @tlrx thank you for the great reviews. I've addressed all comments. |
original-brownbear
approved these changes
Apr 14, 2020
Contributor
original-brownbear
left a comment
There was a problem hiding this comment.
LGTM, thanks @ywelsch !
ywelsch
added a commit
that referenced
this pull request
Apr 14, 2020
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.
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.