Skip to content
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

Open
Xtansia opened this issue Dec 24, 2024 · 0 comments
Labels
bug Something isn't working Cluster Manager untriaged

Comments

@Xtansia
Copy link
Contributor

Xtansia commented Dec 24, 2024

Describe the bug

When retrieving node info total_indexing_buffer_in_bytes should be the raw byte count (e.g. 53687091) and total_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 to byteSizeField were swapped.

Related component

Cluster Manager

To Reproduce

  1. Execute GET /_nodes?human&filter_path=nodes.*.total_indexing_buffer*
  2. See the response:
{
  "nodes": {
    "741KuezCTUaGy0RDV7oxEA": {
      "total_indexing_buffer_in_bytes": "51.1mb",
      "total_indexing_buffer": 53687091
    },
    "eTLqEyRiQzaxSYdZ1KbfVA": {
      "total_indexing_buffer_in_bytes": "51.1mb",
      "total_indexing_buffer": 53687091
    }
  }
}

Expected behavior

The total_indexing_buffer_in_bytes field should contain the raw byte count and the total_indexing_buffer field should contain the human readable version.

Additional Details

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Cluster Manager untriaged
Projects
Status: 🆕 New
Development

No branches or pull requests

1 participant