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

Fix interchanged formats of total_indexing_buffer_in_bytes and total_indexing_buffer #17070

Merged

Conversation

hye-on
Copy link
Contributor

@hye-on hye-on commented Jan 21, 2025

Description

Fix format interchange between total_indexing_buffer_in_bytes and total_indexing_buffer fields in nodes API response.

  • total_indexing_buffer_in_bytes should display raw bytes (e.g. 53687091)
  • total_indexing_buffer should display human readable format (e.g. 51.1mb)

Related Issues

Resolves #16910

Comments

I considered this change to be a breaking change and implemented it to take effect starting from version 3.0.0.
Would it be appropriate to apply this change to the 2.x versions as well?
If so, I would consider implementing it as follows:

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 for your time and consideration!

Check List

  • Functionality includes testing.
  • API changes companion pull request created, if applicable.
    (Based on the feedback I previously received, it was mentioned that for breaking changes, the companion PR should be created after the current PR is merged. I will make sure to create the PR after this change is merged. Thank you!)
  • Public documentation issue/PR created, if applicable.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

…swapped in nodes API

Signed-off-by: hye-on <ain0103@naver.com>
Copy link
Contributor

✅ Gradle check result for 990b14d: SUCCESS

Copy link

codecov bot commented Jan 21, 2025

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Project coverage is 72.25%. Comparing base (6e3d710) to head (990b14d).
Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
...ion/admin/cluster/node/info/NodesInfoResponse.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main   #17070      +/-   ##
============================================
+ Coverage     72.06%   72.25%   +0.18%     
- Complexity    65214    65334     +120     
============================================
  Files          5301     5301              
  Lines        303823   303823              
  Branches      44033    44033              
============================================
+ Hits         218955   219516     +561     
+ Misses        66896    66300     -596     
- Partials      17972    18007      +35     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@reta reta added the v3.0.0 Issues and PRs related to version 3.0.0 label Jan 21, 2025
@reta
Copy link
Collaborator

reta commented Jan 21, 2025

Thanks @hye-on , I agree with you that this is difficult to address in a backward compatible way, targeting 3.0.0 would make perfect sense.

@reta reta mentioned this pull request Jan 21, 2025
26 tasks
@reta reta merged commit 6b1861a into opensearch-project:main Jan 21, 2025
40 of 41 checks passed
akolarkunnu pushed a commit to akolarkunnu/OpenSearch that referenced this pull request Jan 21, 2025
…indexing_buffer (opensearch-project#17070)

* Fix total_indexing_buffer_in_bytes and total_indexing_buffer formats swapped in nodes API

Signed-off-by: hye-on <ain0103@naver.com>

* Move changelog entry to CHANGELOG-3.0 and update PR reference to opensearch-project#17070

Signed-off-by: hye-on <ain0103@naver.com>

---------

Signed-off-by: hye-on <ain0103@naver.com>
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 v3.0.0 Issues and PRs related to version 3.0.0
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

[BUG] NodesInfoResponse serializes total_indexing_buffer and total_indexing_buffer_in_bytes swapped
2 participants