Add native_memory fields to nodes.stats spec - #1145
Open
sean- wants to merge 1 commit into
Open
Conversation
OpenSearch 3.7.0 extended the _nodes/stats response with native-memory reporting. This adds the four corresponding fields to the nodes.stats spec. The opensearch-go client (opensearch-project/opensearch-go#867) already models these locally; upstreaming them here lets that local patch be dropped. All additions are gated on `x-version-added: 3.7.0`, matching the server's Version.V_3_7_0 serialization gates. V_3_7_0 is a defined release constant sitting below CURRENT = V_3_8_0, so 3.7.0 (full patch version) is the correct annotation: Version.java#L174-L177 Changes to spec/schemas/nodes.stats.yaml: - native_memory_utilization_percent on ShardResourceUsageStatsDetail. Emitted as a String.format("%.1f", …) value, so PercentageString (not PercentageNumber) is the correct ref, matching its memory_utilization_percent sibling. NodeResourceUsageStats.java#L145 (wire gate L67-L68) - global_native_memory_usage on ShardAdmissionControlStats. The admission controller name is the JSON key, a sibling of global_cpu_usage/global_io_usage. NativeMemoryBasedAdmissionController.java#L30 - native_memory_usage_tracker on the search-backpressure resource tracker, plus a new ShardSearchBackpressureTaskResourceTrackerNativeMemoryUsageTrackerStats schema. It intentionally omits rolling_avg/rolling_avg_bytes (unlike the heap tracker): the server keeps no rolling baseline for native memory and a zeroed field would be misleading. TaskResourceUsageTrackerType.java#L18 NativeMemoryUsageTracker.java#L213-L237 SearchShardTaskStats.java#L63-L66 (V_3_7_0 wiring) - top-level native_memory, plus new NativeMemory, NativeMemoryAnalyticsBackend, NativeMemoryAllocator, and NativeMemoryAllocatorPool schemas. NodeStats.java#L777-L787 (V_3_7_0 gates L288-L298) AnalyticsBackendNativeMemoryStats.java#L78-L80 NativeAllocatorPoolStats.java#L92-L98 (pool body L174-L176) Field shapes verified against opensearch-project/OpenSearch@3cd77ad (upstream/main). No released tag contains this yet — latest tag is 3.6.0; 3.7.0 is unreleased. Signed-off-by: Sean Chittenden <sean.chittenden@crowdstrike.com>
sean-
requested review from
Tokesh,
VachaShah,
Xtansia,
aabeshov,
harshavamsi,
karenyrx,
lucy66hw and
sachetalva
as code owners
June 10, 2026 16:28
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
OpenSearch 3.7.0 extended the
_nodes/statsresponse with native-memory reporting. This adds the four corresponding fields to thenodes.statsspec. The opensearch-go client (#867) already models these locally; upstreaming them here lets that local patch be dropped.All additions are gated on
x-version-added: 3.7.0, matching the server'sVersion.V_3_7_0gates.V_3_7_0is a defined release constant belowCURRENT = V_3_8_0, so the full3.7.0is the correct annotation:Version.java#L174-L177.Changes to
spec/schemas/nodes.stats.yamlnative_memory_utilization_percentonShardResourceUsageStatsDetail. Emitted as aString.format("%.1f", …)value, soPercentageString(notPercentageNumber) is correct — matching itsmemory_utilization_percentsibling.NodeResourceUsageStats.java#L145· gateL67-L68global_native_memory_usageonShardAdmissionControlStats. The controller name is the JSON key, a sibling ofglobal_cpu_usage/global_io_usage.NativeMemoryBasedAdmissionController.java#L30native_memory_usage_trackeron the search-backpressure resource tracker, plus a newShardSearchBackpressureTaskResourceTrackerNativeMemoryUsageTrackerStatsschema. It intentionally omitsrolling_avg/rolling_avg_bytes(unlike the heap tracker) — the server keeps no rolling baseline for native memory, per the source comment.TaskResourceUsageTrackerType.java#L18·NativeMemoryUsageTracker.java#L213-L237·SearchShardTaskStats.java#L63-L66native_memorytop-level, plus newNativeMemory,NativeMemoryAnalyticsBackend,NativeMemoryAllocator, andNativeMemoryAllocatorPoolschemas.NodeStats.java#L777-L787· gatesL288-L298·AnalyticsBackendNativeMemoryStats.java#L78-L80·NativeAllocatorPoolStats.java#L92-L98Field shapes verified against
opensearch-project/OpenSearch@3cd77ad. No released tag contains this yet — latest tag is3.6.0;3.7.0is unreleased.Issues Resolved
latestdue to unmodeled 3.7 _nodes/stats and security-config fields opensearch-go#870