Skip to content

Conversation

@tanyabti
Copy link

@tanyabti tanyabti commented Dec 16, 2025

Description

Added process statistics to ClusterInfo to enable cluster-wide visibility into node-level metrics including open file descriptors, max file descriptors, CPU, and memory.

Related Issues

Resolves #20111

Check List

  • Functionality includes testing.
  • API changes companion pull request created, if applicable.
  • Public documentation issue/PR created, if applicable.

Summary by CodeRabbit

  • New Features

    • Node process statistics (CPU, memory, open/max file descriptors, timestamps) are now collected from cluster nodes and included in cluster info.
  • API Updates

    • ProcessStats and its Cpu/Mem types are promoted to the public API (since 3.4.0).
  • Tests

    • Integration and unit tests updated; test helpers and mocks extended to validate and supply node process stats.

✏️ Tip: You can customize this high-level summary in your review settings.

@tanyabti tanyabti requested a review from a team as a code owner December 16, 2025 15:23
@github-actions github-actions bot added enhancement Enhancement or improvement to existing feature or request Indexing Indexing, Bulk Indexing and anything related to indexing labels Dec 16, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 16, 2025

📝 Walkthrough

Walkthrough

Adds per-node ProcessStats collection and exposure: marks ProcessStats as PublicApi, extends ClusterInfo to carry nodeProcessStats, updates InternalClusterInfoService to request and store process stats, and updates tests and mocks to handle the new ClusterInfo field and constructor arity.

Changes

Cohort / File(s) Summary
Process Stats API Exposure
server/src/main/java/org/opensearch/monitor/process/ProcessStats.java
Annotated ProcessStats, Mem, and Cpu with @PublicApi(since = "3.4.0") and updated Javadocs to @opensearch.api. No behavioral changes.
ClusterInfo Data Structure
server/src/main/java/org/opensearch/cluster/ClusterInfo.java
Added nodeProcessStats: Map<String, ProcessStats>; updated constructors, Stream (de)serialization (v>=3.4.0), toXContent, and added getNodeProcessStats() accessor.
Cluster Info Service Collection
server/src/main/java/org/opensearch/cluster/InternalClusterInfoService.java
New volatile nodeProcessStats field; include PROCESS metric in NodesStatsRequest; populate/prune/reset nodeProcessStats in refresh(), clusterChanged(), and onFailure(); include in getClusterInfo() payload.
Integration Tests
server/src/internalClusterTest/java/org/opensearch/cluster/ClusterInfoServiceIT.java
Added testClusterInfoServiceCollectsProcessStatsInformation; extended existing test to assert nodeProcessStats sizes before/after error recovery.
ClusterInfo Unit Tests
server/src/test/java/org/opensearch/cluster/ClusterInfoTests.java
Added randomProcessStats helper; updated serialization and XContent tests to include and validate node_process_stats.
Test Call Sites Updated (constructor arity)
server/src/test/java/org/opensearch/.../DiskThresholdMonitorTests.java, .../IndexShardConstraintDeciderOverlapTests.java, .../RemoteShardsBalancerBaseTestCase.java, .../decider/DiskThresholdDeciderTests.java, .../decider/DiskThresholdDeciderUnitTests.java, server/src/test/java/org/opensearch/indices/tiering/TieringRequestValidatorTests.java, server/src/test/java/org/opensearch/snapshots/SnapshotResiliencyTests.java
Updated ClusterInfo constructor calls across tests to pass an additional Map.of() argument (new nodeProcessStats parameter).
Test Framework / Mocking
test/framework/src/main/java/org/opensearch/cluster/MockInternalClusterInfoService.java
SizeFakingClusterInfo now forwards delegate.getNodeProcessStats() to superclass to include process stats in mocked ClusterInfo.

Sequence Diagram(s)

sequenceDiagram
  participant Node
  participant InternalClusterInfoService as InfoService
  participant NodesStatsAPI as NodesStats
  participant ClusterState as ClusterInfoStore

  rect rgba(120,180,240,0.08)
    Note over InfoService,NodesStats: periodic refresh() cycle
    InfoService->>NodesStats: send NodesStatsRequest(metrics: PROCESS, FS, OS, ... )
    NodesStats-->>InfoService: NodeStats per node (includes ProcessStats)
  end

  rect rgba(160,220,160,0.06)
    Note over InfoService,ClusterInfoStore: assemble ClusterInfo and publish
    InfoService->>InfoService: extract NodeStats.getProcess() -> nodeProcessStats map
    InfoService->>ClusterInfoStore: update ClusterInfo(nodeProcessStats=...)
    ClusterInfoStore-->>InfoService: ack / cluster state updated
  end

  rect rgba(240,200,120,0.06)
    Note over InfoService,InfoService: on node removal or failure
    Node-->>InfoService: node removed
    InfoService->>InfoService: prune nodeProcessStats entry
  end
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Suggested labels

v3.4.0

Suggested reviewers

  • msfroh
  • cwperks
  • dbwiddis
  • andrross
  • sachinpkale
  • saratvemulapalli
  • CEHENKLE
  • gbbafna

Poem

🐰
I hopped through nodes both near and far,
Counting handles, CPU, and RAM by star.
Each ClusterInfo got a pocket tight,
To carry process stats both day and night.
Hooray — small data, big insight!

Pre-merge checks and finishing touches

❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 14.63% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
Linked Issues check ❓ Inconclusive The PR implements the core requirements from issue #20111: added ProcessStats fields to ClusterInfo, integrated periodic refresh from node-stats, and exposed process statistics cluster-wide. However, DiskThresholdMonitor enforcement logic for thresholds is not yet implemented. Verify whether threshold enforcement in DiskThresholdMonitor for file handles/memory is required now or deferred to a follow-up PR, as the issue description suggests implementing index-level controls.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title mentions 'file handle stats' but the changes focus on populating process statistics (ProcessStats) including open/max file descriptors, CPU, and memory info into ClusterInfo.
Description check ✅ Passed The description adequately explains the changes, provides the related issue number (#20111), and includes the required checklist with testing indicated.
Out of Scope Changes check ✅ Passed All changes directly support the objectives: ProcessStats integration into ClusterInfo, constructor updates across test files, and exposure via @publicapi annotation are all necessary for the feature.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
server/src/main/java/org/opensearch/cluster/ClusterInfo.java (1)

100-111: Deprecated constructor discards the nodeProcessStats parameter.

The constructor accepts nodeProcessStats as a parameter (line 107) but the delegation call on line 110 ignores it and passes Map.of() instead:

this(..., nodeFileCacheStats, Map.of(), Map.of());
//                            ^^^^^^^^  ^^^^^^^^
//                       nodeResourceUsageStats  nodeProcessStats (ignored!)

This will cause silent data loss for any caller using this deprecated constructor.

 @Deprecated(forRemoval = true)
 public ClusterInfo(
     final Map<String, DiskUsage> leastAvailableSpaceUsage,
     final Map<String, DiskUsage> mostAvailableSpaceUsage,
     final Map<String, Long> shardSizes,
     final Map<ShardRouting, String> routingToDataPath,
     final Map<NodeAndPath, ReservedSpace> reservedSpace,
     final Map<String, AggregateFileCacheStats> nodeFileCacheStats,
     final Map<String, ProcessStats> nodeProcessStats
 ) {
-    this(leastAvailableSpaceUsage, mostAvailableSpaceUsage, shardSizes, routingToDataPath, reservedSpace, nodeFileCacheStats,Map.of(), Map.of());
+    this(leastAvailableSpaceUsage, mostAvailableSpaceUsage, shardSizes, routingToDataPath, reservedSpace, nodeFileCacheStats, Map.of(), nodeProcessStats);
 }
🧹 Nitpick comments (5)
server/src/internalClusterTest/java/org/opensearch/cluster/ClusterInfoServiceIT.java (1)

58-59: New process-stats IT covers end-to-end collection, with one portability caveat

The new integration test correctly exercises InternalClusterInfoService’s nodeProcessStats collection and asserts a healthy shape (two entries, positive timestamp, CPU/mem non-null). One thing to double-check: on any supported platforms where ProcessStats might report “unknown” values (e.g., -1 for file descriptor counts), the >= 0 / > 0 assertions could become brittle. If such platforms are in scope for your CI, consider relaxing those checks or explicitly documenting the expected semantics.

Also applies to: 256-281

server/src/test/java/org/opensearch/cluster/routing/allocation/DiskThresholdMonitorTests.java (1)

1402-1402: Minor formatting inconsistency: extra space before comma.

There's an extra space before the comma: Map.of() , Map.of(). This should be Map.of(), Map.of() for consistency.

-        return new ClusterInfo(diskUsages, null, shardSizes, null, reservedSpace, fileCacheStats, Map.of() , Map.of());
+        return new ClusterInfo(diskUsages, null, shardSizes, null, reservedSpace, fileCacheStats, Map.of(), Map.of());
server/src/main/java/org/opensearch/cluster/ClusterInfo.java (1)

77-79: Remove redundant blank lines.

There are multiple consecutive blank lines that should be reduced to a single blank line for consistency with the rest of the codebase.

     private final Map<String, ProcessStats> nodeProcessStats;
-
-
-
+
     private long avgTotalBytes;
server/src/main/java/org/opensearch/cluster/InternalClusterInfoService.java (2)

120-121: Minor formatting: remove trailing space before semicolon.

There's an extra space before the semicolon on line 120.

-    private volatile Map<String, ProcessStats> nodeProcessStats ;
-
+    private volatile Map<String, ProcessStats> nodeProcessStats;

329-329: Minor formatting: trailing whitespace.

Remove trailing spaces after the statement on line 329.

-                    nodeProcessStats = Map.of();   
+                    nodeProcessStats = Map.of();
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e798353 and c8b279f.

📒 Files selected for processing (13)
  • server/src/internalClusterTest/java/org/opensearch/cluster/ClusterInfoServiceIT.java (4 hunks)
  • server/src/main/java/org/opensearch/cluster/ClusterInfo.java (11 hunks)
  • server/src/main/java/org/opensearch/cluster/InternalClusterInfoService.java (8 hunks)
  • server/src/main/java/org/opensearch/monitor/process/ProcessStats.java (4 hunks)
  • server/src/test/java/org/opensearch/cluster/ClusterInfoTests.java (6 hunks)
  • server/src/test/java/org/opensearch/cluster/routing/allocation/DiskThresholdMonitorTests.java (1 hunks)
  • server/src/test/java/org/opensearch/cluster/routing/allocation/IndexShardConstraintDeciderOverlapTests.java (1 hunks)
  • server/src/test/java/org/opensearch/cluster/routing/allocation/RemoteShardsBalancerBaseTestCase.java (1 hunks)
  • server/src/test/java/org/opensearch/cluster/routing/allocation/decider/DiskThresholdDeciderTests.java (1 hunks)
  • server/src/test/java/org/opensearch/cluster/routing/allocation/decider/DiskThresholdDeciderUnitTests.java (3 hunks)
  • server/src/test/java/org/opensearch/indices/tiering/TieringRequestValidatorTests.java (4 hunks)
  • server/src/test/java/org/opensearch/snapshots/SnapshotResiliencyTests.java (1 hunks)
  • test/framework/src/main/java/org/opensearch/cluster/MockInternalClusterInfoService.java (2 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-12-12T13:31:41.214Z
Learnt from: andriyredko
Repo: opensearch-project/OpenSearch PR: 20017
File: plugins/transport-reactor-netty4/src/test/java/org/opensearch/http/reactor/netty4/ssl/SecureReactorNetty4HttpServerTransportTests.java:642-646
Timestamp: 2025-12-12T13:31:41.214Z
Learning: In the OpenSearch ReactorNetty4 secure HTTP transport tests (plugins/transport-reactor-netty4/src/test/java/org/opensearch/http/reactor/netty4/ssl/SecureReactorNetty4HttpServerTransportTests.java), the createBuilderWithPort() helper intentionally uses randomBoolean() for the HTTP/3 enabled setting to ensure all tests validate correct behavior with both HTTP/3 enabled and disabled configurations.

Applied to files:

  • server/src/test/java/org/opensearch/cluster/ClusterInfoTests.java
🧬 Code graph analysis (2)
server/src/main/java/org/opensearch/cluster/InternalClusterInfoService.java (1)
server/src/main/java/org/opensearch/action/admin/cluster/node/stats/NodeStats.java (1)
  • NodeStats (81-658)
server/src/main/java/org/opensearch/monitor/process/ProcessStats.java (1)
server/src/main/java/org/opensearch/cluster/ClusterInfo.java (2)
  • PublicApi (66-505)
  • PublicApi (415-503)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: gradle-check
🔇 Additional comments (15)
server/src/test/java/org/opensearch/snapshots/SnapshotResiliencyTests.java (1)

466-480: ClusterInfo ctor update correctly supplies empty nodeProcessStats

The extended ClusterInfo construction (adding the final Map.of()) preserves argument ordering and types and cleanly initializes nodeProcessStats as empty, which is appropriate for this test.

server/src/test/java/org/opensearch/cluster/routing/allocation/RemoteShardsBalancerBaseTestCase.java (1)

286-295: DevNullClusterInfo now correctly initializes nodeProcessStats

Passing Map.of() as the final super-argument cleanly initializes nodeProcessStats while preserving existing behavior for disk usage, shard sizes, and node resource stats.

server/src/test/java/org/opensearch/cluster/routing/allocation/decider/DiskThresholdDeciderUnitTests.java (1)

128-139: All ClusterInfo call sites updated consistently for nodeProcessStats

Each ClusterInfo construction here now passes an 8th Map.of() argument for nodeProcessStats, with prior parameters (leastAvailableUsages, mostAvailableUsage, shardSizes, optional routingToDataPath, reservedSpace, nodeFileCacheStats, nodeResourceUsageStats) remaining in the correct order.

Also applies to: 215-224, 341-350

test/framework/src/main/java/org/opensearch/cluster/MockInternalClusterInfoService.java (1)

159-171: SizeFakingClusterInfo correctly forwards new ClusterInfo fields

Forwarding both delegate.getNodeResourceUsageStats() and delegate.getNodeProcessStats() into the extended ClusterInfo constructor keeps the mock wrapper behavior aligned with the real ClusterInfo structure.

server/src/test/java/org/opensearch/cluster/routing/allocation/IndexShardConstraintDeciderOverlapTests.java (1)

173-182: DevNullClusterInfo wired up with empty nodeProcessStats

The updated super(...) call correctly passes nodeResourceUsageStats as the 7th argument and an empty Map as nodeProcessStats, maintaining previous semantics while satisfying the new constructor.

server/src/test/java/org/opensearch/cluster/routing/allocation/decider/DiskThresholdDeciderTests.java (1)

1586-1603: DevNullClusterInfo constructor chain handles nodeProcessStats correctly

The root DevNullClusterInfo constructor now passes nodeResourceUsages and an empty nodeProcessStats Map into ClusterInfo, and the shorter overloads delegate to it without behavior changes. This keeps all existing tests valid under the extended ClusterInfo API.

server/src/internalClusterTest/java/org/opensearch/cluster/ClusterInfoServiceIT.java (1)

397-414: Node process stats cleared and recovered in error path

Extending the clear-on-error test to assert getNodeProcessStats().size() is 0 on failure and 2 after recovery keeps the new metric’s lifecycle aligned with disk, shard, and resource stats.

server/src/test/java/org/opensearch/cluster/ClusterInfoTests.java (2)

57-81: Good test coverage for serialization.

The serialization test properly includes randomized ProcessStats and verifies the data survives the round-trip. The size comparison at line 80 is appropriate since ProcessStats doesn't implement equals().


166-183: Test helper correctly generates randomized ProcessStats.

The helper method properly creates ProcessStats instances with randomized values for CPU percent, CPU total time, memory, and file descriptors. This provides good coverage for the serialization tests.

server/src/test/java/org/opensearch/indices/tiering/TieringRequestValidatorTests.java (1)

174-174: Constructor updates align with new ClusterInfo signature.

All ClusterInfo constructor invocations correctly add the empty Map.of() for the new nodeProcessStats parameter. These tests don't require process stats data, so empty maps are appropriate.

Also applies to: 188-188, 205-205, 308-308

server/src/main/java/org/opensearch/monitor/process/ProcessStats.java (1)

145-148: Consistent public API exposure for inner classes.

The Mem and Cpu inner classes are appropriately annotated with the same @PublicApi version as the parent ProcessStats class. This ensures consumers can rely on these types as part of the stable API surface.

Also applies to: 173-176

server/src/main/java/org/opensearch/cluster/InternalClusterInfoService.java (4)

209-213: LGTM!

The cleanup logic for nodeProcessStats correctly follows the same pattern used for other node-related maps, ensuring removed node entries are properly pruned.


226-237: LGTM!

The getClusterInfo() method correctly passes the new nodeProcessStats map to the ClusterInfo constructor, consistent with the existing pattern for other node statistics.


244-255: LGTM!

Adding the PROCESS metric to the NodesStatsRequest is the correct way to fetch process statistics from nodes.


301-306: LGTM!

The null-check filter for nodeStats.getProcess() correctly handles the nullable ProcessStats field documented in NodeStats. The stream-based collection follows the same pattern used elsewhere in this method.

@github-actions
Copy link
Contributor

❌ Gradle check result for c8b279f: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

Signed-off-by: tanyabti <tanyabti@amazon.com>
Signed-off-by: tanyabti <tanyabti@amazon.com>
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
server/src/main/java/org/opensearch/cluster/ClusterInfo.java (1)

96-117: Deprecated ClusterInfo constructor silently discards nodeProcessStats

The deprecated constructor accepts nodeProcessStats but then ignores it when delegating:

this(
    leastAvailableSpaceUsage,
    mostAvailableSpaceUsage,
    shardSizes,
    routingToDataPath,
    reservedSpace,
    nodeFileCacheStats,
    Map.of(),      // nodeResourceUsageStats
    Map.of()       // nodeProcessStats (should forward param)
);

Any callers still using this ctor will lose process stats unexpectedly, which is surprising even for deprecated API and can break consumers relying on it.

Consider forwarding the argument while still defaulting nodeResourceUsageStats to an empty map, e.g.:

this(
    leastAvailableSpaceUsage,
    mostAvailableSpaceUsage,
    shardSizes,
    routingToDataPath,
    reservedSpace,
    nodeFileCacheStats,
    Map.of(),
    nodeProcessStats
);
🧹 Nitpick comments (1)
server/src/main/java/org/opensearch/cluster/InternalClusterInfoService.java (1)

116-121: nodeProcessStats lifecycle in InternalClusterInfoService is wired correctly

  • Metric is requested in updateNodeStats, populated from NodeStats.getProcess() in refresh(), included in getClusterInfo(), pruned on data‑node removal, and cleared on failure alongside other maps. This mirrors existing patterns for disk and resource usage stats.
  • Minor optional: you call adjustNodesStats(nodesStatsResponse.getNodes()) three times in onResponse; caching that result in a local variable would avoid redundant work, though it’s unlikely to be noticeable here.

Also applies to: 131-137, 191-214, 225-237, 245-252, 301-305, 329-330

📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b2c319e and 9ddf2c8.

📒 Files selected for processing (13)
  • server/src/internalClusterTest/java/org/opensearch/cluster/ClusterInfoServiceIT.java
  • server/src/main/java/org/opensearch/cluster/ClusterInfo.java
  • server/src/main/java/org/opensearch/cluster/InternalClusterInfoService.java
  • server/src/main/java/org/opensearch/monitor/process/ProcessStats.java
  • server/src/test/java/org/opensearch/cluster/ClusterInfoTests.java
  • server/src/test/java/org/opensearch/cluster/routing/allocation/DiskThresholdMonitorTests.java
  • server/src/test/java/org/opensearch/cluster/routing/allocation/IndexShardConstraintDeciderOverlapTests.java
  • server/src/test/java/org/opensearch/cluster/routing/allocation/RemoteShardsBalancerBaseTestCase.java
  • server/src/test/java/org/opensearch/cluster/routing/allocation/decider/DiskThresholdDeciderTests.java
  • server/src/test/java/org/opensearch/cluster/routing/allocation/decider/DiskThresholdDeciderUnitTests.java
  • server/src/test/java/org/opensearch/indices/tiering/TieringRequestValidatorTests.java
  • server/src/test/java/org/opensearch/snapshots/SnapshotResiliencyTests.java
  • test/framework/src/main/java/org/opensearch/cluster/MockInternalClusterInfoService.java
🚧 Files skipped from review as they are similar to previous changes (6)
  • server/src/test/java/org/opensearch/cluster/routing/allocation/IndexShardConstraintDeciderOverlapTests.java
  • server/src/test/java/org/opensearch/cluster/routing/allocation/DiskThresholdMonitorTests.java
  • server/src/test/java/org/opensearch/cluster/ClusterInfoTests.java
  • server/src/test/java/org/opensearch/cluster/routing/allocation/RemoteShardsBalancerBaseTestCase.java
  • test/framework/src/main/java/org/opensearch/cluster/MockInternalClusterInfoService.java
  • server/src/test/java/org/opensearch/cluster/routing/allocation/decider/DiskThresholdDeciderTests.java
🧰 Additional context used
🧬 Code graph analysis (1)
server/src/main/java/org/opensearch/monitor/process/ProcessStats.java (1)
server/src/main/java/org/opensearch/cluster/ClusterInfo.java (2)
  • PublicApi (65-511)
  • PublicApi (421-509)
🔇 Additional comments (6)
server/src/test/java/org/opensearch/snapshots/SnapshotResiliencyTests.java (1)

466-481: ClusterInfo constructor arity update looks correct

The new 8‑arg ClusterInfo invocation passes nodeFileCacheStats plus empty maps for the new resource/process stats parameters in the correct order; behavior of this test remains unchanged and focused on file cache stats.

server/src/test/java/org/opensearch/cluster/routing/allocation/decider/DiskThresholdDeciderUnitTests.java (1)

128-139: ClusterInfo constructor extensions wired correctly in disk threshold tests

All three updated ClusterInfo constructions now supply the additional nodeResourceUsageStats and nodeProcessStats map arguments as empty maps, preserving the previous behavior while matching the new 8‑parameter signature.

Also applies to: 215-224, 341-350

server/src/main/java/org/opensearch/cluster/ClusterInfo.java (1)

71-82: nodeProcessStats integration (field, ctor, IO, XContent, accessor) looks consistent

  • New nodeProcessStats field is threaded through the primary constructor and default ctor correctly.
  • Serialization/deserialization use the same Version.V_3_4_0 gate on both read and write paths.
  • XContent adds a dedicated node_process_stats object per node and delegates to ProcessStats.toXContent, matching the pattern used for node_resource_usage_stats.
  • getNodeProcessStats() returns an unmodifiable view, consistent with other getters.

Aside from the deprecated‑ctor forwarding noted separately, the rest of the wiring for process stats in ClusterInfo looks solid.

Also applies to: 129-149, 171-183, 217-233, 255-267, 332-337

server/src/internalClusterTest/java/org/opensearch/cluster/ClusterInfoServiceIT.java (1)

58-59: ProcessStats collection IT and error‑path assertions are well‑scoped

The new integration test validates per‑node ProcessStats shape and count, and the extended clear‑on‑error test correctly asserts that nodeProcessStats is emptied on failure and repopulated after recovery. This reuses the same “2 data nodes” assumption as the existing disk/resource tests, so behavior stays consistent across metrics.

Also applies to: 256-281, 401-414

server/src/main/java/org/opensearch/monitor/process/ProcessStats.java (1)

35-36: PublicApi annotations for ProcessStats and inner classes are appropriate

Marking ProcessStats, Mem, and Cpu as @PublicApi(since = "3.4.0") and updating the Javadoc tags aligns with their new exposure through ClusterInfo.getNodeProcessStats() and the existing PublicApi pattern in core classes.

Also applies to: 46-52, 142-148, 170-176

server/src/test/java/org/opensearch/indices/tiering/TieringRequestValidatorTests.java (1)

171-176: Tiering tests correctly adapted to extended ClusterInfo constructor

All updated ClusterInfo constructions now supply empty maps for file‑cache, resource‑usage, and process stats in the correct parameter order, keeping the tests focused on disk/shard sizing behavior without altering semantics.

Also applies to: 185-191, 202-206, 306-309

@github-actions
Copy link
Contributor

❌ Gradle check result for 9ddf2c8: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@github-actions
Copy link
Contributor

✅ Gradle check result for 86163bf: SUCCESS

@codecov
Copy link

codecov bot commented Dec 25, 2025

Codecov Report

❌ Patch coverage is 66.66667% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 73.19%. Comparing base (2216423) to head (86163bf).
⚠️ Report is 8 commits behind head on main.

Files with missing lines Patch % Lines
.../main/java/org/opensearch/cluster/ClusterInfo.java 50.00% 5 Missing and 3 partials ⚠️
...opensearch/cluster/InternalClusterInfoService.java 90.90% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main   #20260      +/-   ##
============================================
- Coverage     73.28%   73.19%   -0.09%     
+ Complexity    71723    71687      -36     
============================================
  Files          5785     5785              
  Lines        328137   328163      +26     
  Branches      47270    47275       +5     
============================================
- Hits         240465   240203     -262     
- Misses        68397    68697     +300     
+ Partials      19275    19263      -12     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@RS146BIJAY
Copy link
Contributor

Codecov Report

❌ Patch coverage is 66.66667% with 9 lines in your changes missing coverage. Please review. ✅ Project coverage is 73.19%. Comparing base (2216423) to head (86163bf). ⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
.../main/java/org/opensearch/cluster/ClusterInfo.java 50.00% 5 Missing and 3 partials ⚠️
...opensearch/cluster/InternalClusterInfoService.java 90.90% 0 Missing and 1 partial ⚠️
Additional details and impacted files

@@             Coverage Diff              @@
##               main   #20260      +/-   ##
============================================
- Coverage     73.28%   73.19%   -0.09%     
+ Complexity    71723    71687      -36     
============================================
  Files          5785     5785              
  Lines        328137   328163      +26     
  Branches      47270    47275       +5     
============================================
- Hits         240465   240203     -262     
- Misses        68397    68697     +300     
+ Partials      19275    19263      -12     

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

🚀 New features to boost your workflow:

Coverage is still low. Please fix.

@github-actions
Copy link
Contributor

❌ Gradle check result for c792e4b: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@github-actions
Copy link
Contributor

❌ Gradle check result for dd8e10c: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@github-actions
Copy link
Contributor

❌ Gradle check result for 3141550: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Enhancement or improvement to existing feature or request Indexing Indexing, Bulk Indexing and anything related to indexing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Context Aware Segments] Monitor virtual file address and file handle count in DiskThresholdMonitor

2 participants