F64116045 opened a new pull request, #11717:
URL: https://github.com/apache/ozone/pull/11717

   ## What changes were proposed in this pull request?
   
   `SCMCommonPlacementPolicy#validateContainerPlacement` counts replicas on 
each rack whenever Replication Manager checks container placement. 
   The current stream uses `groupingBy` and `reducing`, creating temporary 
objects on every call.
   
   This change counts the replicas directly with a `HashMap`.
   It keeps the existing handling for missing rack paths and dead maintenance 
nodes.
   
   ## What is the link to the Apache JIRA?
   
   https://issues.apache.org/jira/browse/HDDS-17381
   
   ## How was this patch tested?
   
   CI: 
   
   Benchmarked the old and new code back to back under the same conditions.
   Each version ran three times, with 1 second of warmup followed by 2 seconds 
of measurement.
   The table shows the median. Memory allocation was averaged over 100,000 
calls.
   
   Case | Throughput | Change | Allocation | Change
   -- | -- | -- | -- | --
   Ratis THREE | 3,648,640 → 5,858,944 ops/s | +60.6% | 920 → 312 bytes/op | 
-66.1%
   EC 6+3 | 2,180,352 → 2,703,232 ops/s | +24.0% | 1,216 → 440 bytes/op | -63.8%
   
   Assisted by: GPT-5.6 Sol


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to