Skip to content

Fix interchanged formats of total_indexing_buffer_in_bytes and total_indexing_buffer #17070

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

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@
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());

Check warning on line 101 in server/src/main/java/org/opensearch/action/admin/cluster/node/info/NodesInfoResponse.java

View check run for this annotation

Codecov / codecov/patch

server/src/main/java/org/opensearch/action/admin/cluster/node/info/NodesInfoResponse.java#L101

Added line #L101 was not covered by tests
}

builder.startArray("roles");
Expand Down
Loading