Merged
Conversation
In principle this utility class lets us format potentially-large numbers nicely in API responses, but in practice it is wholly unused for that purpose. Nor is it used to accept user input (e.g. setting values) that could potentially be large. In the few places it appears in the codebase we can just use `Long` instead.
Collaborator
|
Pinging @elastic/es-core-infra (Team:Core/Infra) |
DaveCTurner
commented
Sep 17, 2025
|
|
||
| if (poolInfo != null) { | ||
| if (poolInfo.getQueueSize() != null) { | ||
| maxQueueSize = poolInfo.getQueueSize().singles(); |
Member
Author
There was a problem hiding this comment.
This was the only place we could possibly have used SizeValue for nice formatting of large numbers in a cat API, but the .singles() call forces it to be a pure integer instead.
| private final int max; | ||
| private final TimeValue keepAlive; | ||
| private final SizeValue queueSize; | ||
| private final Long queueSize; |
Member
Author
There was a problem hiding this comment.
The only possible observable change is that the Info#toString() now always shows the bare integer rather than something like 10k for larger numbers. I'm not sure this is actually visible to end-users anywhere and honestly IMO that's an improvement.
mosche
approved these changes
Sep 17, 2025
| } | ||
| } | ||
| if (value instanceof SizeValue v) { | ||
| String resolution = request.param("size"); |
Contributor
There was a problem hiding this comment.
Looks like that would even conflict with usage of size in cat.transforms and cat.ml_trained_models 💥
mridula-s109
pushed a commit
to mridula-s109/elasticsearch
that referenced
this pull request
Sep 17, 2025
In principle this utility class lets us format potentially-large numbers nicely in API responses, but in practice it is wholly unused for that purpose. Nor is it used to accept user input (e.g. setting values) that could potentially be large. In the few places it appears in the codebase we can just use `Long` instead.
szybia
added a commit
to szybia/elasticsearch
that referenced
this pull request
Sep 17, 2025
* upstream/main: Add additional logging to make spotting stats issues easier (elastic#133972) [ESQL] Clean up ESQL enrich landing page (elastic#134820) ES|QL: Make kibana docs for Query settings more consistent (elastic#134881) Add file extension metadata to cache miss counter from SharedBlobCacheService (elastic#134374) Add IT for num_reduced_phases with batched query execution (elastic#134312) Remove `SizeValue` (elastic#134871)
gmjehovich
pushed a commit
to gmjehovich/elasticsearch
that referenced
this pull request
Sep 18, 2025
In principle this utility class lets us format potentially-large numbers nicely in API responses, but in practice it is wholly unused for that purpose. Nor is it used to accept user input (e.g. setting values) that could potentially be large. In the few places it appears in the codebase we can just use `Long` instead.
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.
In principle this utility class lets us format potentially-large numbers
nicely in API responses, but in practice it is wholly unused for that
purpose. Nor is it used to accept user input (e.g. setting values) that
could potentially be large. In the few places it appears in the codebase
we can just use
Longinstead.