Skip to content

Commit

Permalink
Fix interchanged formats of total_indexing_buffer_in_bytes and total_…
Browse files Browse the repository at this point in the history
…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>
  • Loading branch information
hye-on authored Jan 21, 2025
1 parent f5c89c1 commit 6b1861a
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG-3.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- Fix 'org.apache.hc.core5.http.ParseException: Invalid protocol version' under JDK 16+ ([#4827](https://github.com/opensearch-project/OpenSearch/pull/4827))
- Fix compression support for h2c protocol ([#4944](https://github.com/opensearch-project/OpenSearch/pull/4944))
- Don't over-allocate in HeapBufferedAsyncEntityConsumer in order to consume the response ([#9993](https://github.com/opensearch-project/OpenSearch/pull/9993))
- Fix swapped field formats in nodes API where `total_indexing_buffer_in_bytes` and `total_indexing_buffer` values were reversed ([#17070](https://github.com/opensearch-project/OpenSearch/pull/17070))


### Security

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
"Test total indexing buffer fields should have correct formats":
- skip:
version: " - 2.99.99"
reason: "this change is added in 3.0.0"
features: [arbitrary_key]

- do:
nodes.info: {}
- set:
nodes._arbitrary_key_: node_id

- do:
nodes.info:
human: true
filter_path: "nodes.*.total_indexing_buffer*"

- gte: { nodes.$node_id.total_indexing_buffer_in_bytes: 0 }

- match:
nodes.$node_id.total_indexing_buffer: /^\d+(\.\d+)?(b|kb|mb|gb|tb|pb)$/
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public XContentBuilder toXContent(XContentBuilder builder, Params params) throws
builder.field("build_type", nodeInfo.getBuild().type().displayName());
builder.field("build_hash", nodeInfo.getBuild().hash());
if (nodeInfo.getTotalIndexingBuffer() != null) {
builder.humanReadableField("total_indexing_buffer", "total_indexing_buffer_in_bytes", nodeInfo.getTotalIndexingBuffer());
builder.humanReadableField("total_indexing_buffer_in_bytes", "total_indexing_buffer", nodeInfo.getTotalIndexingBuffer());
}

builder.startArray("roles");
Expand Down

0 comments on commit 6b1861a

Please sign in to comment.