From 058267449b95beef1204186cb1fec82925850828 Mon Sep 17 00:00:00 2001 From: hye-on Date: Sat, 25 Jan 2025 16:21:46 +0900 Subject: [PATCH 1/5] Fixed swapped schema references in nodes info API buffer fields Signed-off-by: hye-on --- CHANGELOG.md | 1 + spec/schemas/nodes.info.yaml | 5 ++--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 073dcec25..37fb30d3c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -107,6 +107,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - Fixed Memory Circuit Breaker flaky error in ML APIs ([#788](https://github.com/opensearch-project/opensearch-api-specification/pull/788)) - Fixed GeoDistanceSort schema ([#805](https://github.com/opensearch-project/opensearch-api-specification/pull/805)) - Fixed Aggregation schemas([#801](https://github.com/opensearch-project/opensearch-api-specification/pull/801)) +- Fixed swapped schema references in nodes info API buffer fields([#808](https://github.com/opensearch-project/opensearch-api-specification/pull/808)) ### Changed - Changed `tasks._common:TaskInfo` and `tasks._common:TaskGroup` to be composed of a `tasks._common:TaskInfoBase` ([#683](https://github.com/opensearch-project/opensearch-api-specification/pull/683)) diff --git a/spec/schemas/nodes.info.yaml b/spec/schemas/nodes.info.yaml index e9dd2955c..5a71faa24 100644 --- a/spec/schemas/nodes.info.yaml +++ b/spec/schemas/nodes.info.yaml @@ -64,12 +64,11 @@ components: type: object additionalProperties: $ref: '#/components/schemas/NodeThreadPoolInfo' - # NOTE: total_indexing_buffer and total_indexing_buffer_in_bytes inverted according to the standard pattern, this is a bug: https://github.com/opensearch-project/OpenSearch/issues/16910 total_indexing_buffer: description: Total heap allowed to be used to hold recently indexed documents before they must be written to disk. This size is a shared pool across all shards on this node, and is controlled by Indexing Buffer settings. - $ref: '_common.yaml#/components/schemas/ByteCount' - total_indexing_buffer_in_bytes: $ref: '_common.yaml#/components/schemas/HumanReadableByteCount' + total_indexing_buffer_in_bytes: + $ref: '_common.yaml#/components/schemas/ByteCount' transport: $ref: '#/components/schemas/NodeInfoTransport' transport_address: From 394be9e360aada717c04a5da370fa09ebb5f190b Mon Sep 17 00:00:00 2001 From: hye-on Date: Mon, 27 Jan 2025 17:49:32 +0900 Subject: [PATCH 2/5] Add version specific schema handling for total_indexing_buffer and total_indexing_buffer_in_bytes fields Signed-off-by: hye-on --- spec/schemas/nodes.info.yaml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/spec/schemas/nodes.info.yaml b/spec/schemas/nodes.info.yaml index 5a71faa24..c4e9a39f9 100644 --- a/spec/schemas/nodes.info.yaml +++ b/spec/schemas/nodes.info.yaml @@ -66,9 +66,17 @@ components: $ref: '#/components/schemas/NodeThreadPoolInfo' total_indexing_buffer: description: Total heap allowed to be used to hold recently indexed documents before they must be written to disk. This size is a shared pool across all shards on this node, and is controlled by Indexing Buffer settings. - $ref: '_common.yaml#/components/schemas/HumanReadableByteCount' + oneOf: + - $ref: '_common.yaml#/components/schemas/ByteCount' + x-version-removed: 3.0 + - $ref: '_common.yaml#/components/schemas/HumanReadableByteCount' + x-version-added: 3.0 total_indexing_buffer_in_bytes: - $ref: '_common.yaml#/components/schemas/ByteCount' + oneOf: + - $ref: '_common.yaml#/components/schemas/HumanReadableByteCount' + x-version-removed: 3.0 + - $ref: '_common.yaml#/components/schemas/ByteCount' + x-version-added: 3.0 transport: $ref: '#/components/schemas/NodeInfoTransport' transport_address: From 8f8e6e90cbe150072214670e671962a6ecda60d4 Mon Sep 17 00:00:00 2001 From: hye-on Date: Mon, 27 Jan 2025 17:56:29 +0900 Subject: [PATCH 3/5] Fix version number format in nodes.info.yaml Signed-off-by: hye-on --- spec/schemas/nodes.info.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/spec/schemas/nodes.info.yaml b/spec/schemas/nodes.info.yaml index c4e9a39f9..2f00c3d50 100644 --- a/spec/schemas/nodes.info.yaml +++ b/spec/schemas/nodes.info.yaml @@ -68,15 +68,15 @@ components: description: Total heap allowed to be used to hold recently indexed documents before they must be written to disk. This size is a shared pool across all shards on this node, and is controlled by Indexing Buffer settings. oneOf: - $ref: '_common.yaml#/components/schemas/ByteCount' - x-version-removed: 3.0 + x-version-removed: '3.0' - $ref: '_common.yaml#/components/schemas/HumanReadableByteCount' - x-version-added: 3.0 + x-version-added: '3.0' total_indexing_buffer_in_bytes: oneOf: - $ref: '_common.yaml#/components/schemas/HumanReadableByteCount' - x-version-removed: 3.0 + x-version-removed: '3.0' - $ref: '_common.yaml#/components/schemas/ByteCount' - x-version-added: 3.0 + x-version-added: '3.0' transport: $ref: '#/components/schemas/NodeInfoTransport' transport_address: From 1622f24c8d936b3e6ecc0be097e074442693417f Mon Sep 17 00:00:00 2001 From: hye-on Date: Mon, 27 Jan 2025 18:50:34 +0900 Subject: [PATCH 4/5] Remove version tags and add notes for schema changes Signed-off-by: hye-on --- spec/schemas/nodes.info.yaml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/spec/schemas/nodes.info.yaml b/spec/schemas/nodes.info.yaml index 2f00c3d50..b70c9f231 100644 --- a/spec/schemas/nodes.info.yaml +++ b/spec/schemas/nodes.info.yaml @@ -66,17 +66,15 @@ components: $ref: '#/components/schemas/NodeThreadPoolInfo' total_indexing_buffer: description: Total heap allowed to be used to hold recently indexed documents before they must be written to disk. This size is a shared pool across all shards on this node, and is controlled by Indexing Buffer settings. + # NOTE: In OpenSearch 3.0, this field will change from ByteCount to HumanReadableByteCount oneOf: - $ref: '_common.yaml#/components/schemas/ByteCount' - x-version-removed: '3.0' - $ref: '_common.yaml#/components/schemas/HumanReadableByteCount' - x-version-added: '3.0' total_indexing_buffer_in_bytes: + # NOTE: In OpenSearch 3.0, this field will change from HumanReadableByteCount to ByteCount oneOf: - $ref: '_common.yaml#/components/schemas/HumanReadableByteCount' - x-version-removed: '3.0' - $ref: '_common.yaml#/components/schemas/ByteCount' - x-version-added: '3.0' transport: $ref: '#/components/schemas/NodeInfoTransport' transport_address: From d6b2b4e4f98977d932f064551071ea93ac456482 Mon Sep 17 00:00:00 2001 From: Thomas Farr Date: Thu, 27 Mar 2025 12:37:39 +1300 Subject: [PATCH 5/5] Revert "Remove version tags and add notes for schema changes" This reverts commit 1622f24c8d936b3e6ecc0be097e074442693417f. Signed-off-by: Thomas Farr --- spec/schemas/nodes.info.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/spec/schemas/nodes.info.yaml b/spec/schemas/nodes.info.yaml index b70c9f231..2f00c3d50 100644 --- a/spec/schemas/nodes.info.yaml +++ b/spec/schemas/nodes.info.yaml @@ -66,15 +66,17 @@ components: $ref: '#/components/schemas/NodeThreadPoolInfo' total_indexing_buffer: description: Total heap allowed to be used to hold recently indexed documents before they must be written to disk. This size is a shared pool across all shards on this node, and is controlled by Indexing Buffer settings. - # NOTE: In OpenSearch 3.0, this field will change from ByteCount to HumanReadableByteCount oneOf: - $ref: '_common.yaml#/components/schemas/ByteCount' + x-version-removed: '3.0' - $ref: '_common.yaml#/components/schemas/HumanReadableByteCount' + x-version-added: '3.0' total_indexing_buffer_in_bytes: - # NOTE: In OpenSearch 3.0, this field will change from HumanReadableByteCount to ByteCount oneOf: - $ref: '_common.yaml#/components/schemas/HumanReadableByteCount' + x-version-removed: '3.0' - $ref: '_common.yaml#/components/schemas/ByteCount' + x-version-added: '3.0' transport: $ref: '#/components/schemas/NodeInfoTransport' transport_address: