-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
[BUG] NodesInfoResponse
serializes total_indexing_buffer
and total_indexing_buffer_in_bytes
swapped
#16910
Comments
Hi, @Xtansia Can I work on this? I see a few options:
Version currentVersion = Version.CURRENT;
if (currentVersion.onOrAfter(Version.V_3_0_0)) {
builder.humanReadableField("total_indexing_buffer_in_bytes", "total_indexing_buffer", nodeInfo.getTotalIndexingBuffer());
} else {
builder.humanReadableField("total_indexing_buffer", "total_indexing_buffer_in_bytes", nodeInfo.getTotalIndexingBuffer());
} Thank you, and I look forward to your feedback :) |
@hye-on Feel free to pick this up! |
Describe the bug
When retrieving node info
total_indexing_buffer_in_bytes
should be the raw byte count (e.g.53687091
) andtotal_indexing_buffer
should be the human readable version (e.g.51.1mb
). This is currently swapped and is against the patterns set out by other human byte count properties.This discrepancy was introduced >8 years ago: ebc3c17#diff-0f31418774699d0487aba335ddccd8942599b4a9999e92e2932bcfb6a22aa392
The two explicit fields were merged to use on of the "human readable field" XContentBuilder methods to enable use of the
?human
parameter, however the parameters tobyteSizeField
were swapped.Related component
Cluster Manager
To Reproduce
GET /_nodes?human&filter_path=nodes.*.total_indexing_buffer*
Expected behavior
The
total_indexing_buffer_in_bytes
field should contain the raw byte count and thetotal_indexing_buffer
field should contain the human readable version.Additional Details
No response
The text was updated successfully, but these errors were encountered: