You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "sreejasahithi (via GitHub)" <gi...@apache.org> on 2026/07/10 06:30:07 UTC

[PR] HDDS-15656. Fix non-atomic data size accumulation in ContainerBalancer move callback [ozone]

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

   ## What changes were proposed in this pull request?
   When multiple container moves finish at the same time, each move runs a callback on its own thread. 
   The balancer was updating moved data size with a plain long (sizeActuallyMovedInLatestIteration += ...).
   This update is not thread safe, so some bytes could be lost and the reported moved size could be low.
   
   This PR updates moved bytes through the existing balancer metrics in the callback, the same way move counts are already updated.
   
   ## What is the link to the Apache JIRA
   
   [HDDS-15656](https://issues.apache.org/jira/browse/HDDS-15656)
   
   ## How was this patch tested?
   
   Green CI : https://github.com/sreejasahithi/ozone/actions/runs/29022183864


-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


Re: [PR] HDDS-15656. Fix non-atomic data size accumulation in ContainerBalancer move callback [ozone]

Posted by "ashishkumar50 (via GitHub)" <gi...@apache.org>.
ashishkumar50 merged PR #10708:
URL: https://github.com/apache/ozone/pull/10708


-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


Re: [PR] HDDS-15656. Fix non-atomic data size accumulation in ContainerBalancer move callback [ozone]

Posted by "sreejasahithi (via GitHub)" <gi...@apache.org>.
sreejasahithi commented on PR #10708:
URL: https://github.com/apache/ozone/pull/10708#issuecomment-4957159198

   > Thanks for the fix! @sreejasahithi Overall LGTM. 👍
   > 
   > A couple of quick questions:
   > 
   > * With the callback now updating the metric live, is reading it in both the finished and unfinished paths in `getDataMoveInfo` intentional?
   
   Before the fix, in progress stats read `sizeActuallyMovedInLatestIteration` while the metric stayed 0 until `checkIterationMoveResults()`. Now callbacks update the metric live, so both paths read `metrics.getDataSizeMovedInLatestIteration()` for a consistent view.


-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


Re: [PR] HDDS-15656. Fix non-atomic data size accumulation in ContainerBalancer move callback [ozone]

Posted by "sreejasahithi (via GitHub)" <gi...@apache.org>.
sreejasahithi commented on PR #10708:
URL: https://github.com/apache/ozone/pull/10708#issuecomment-4957181416

   > @sreejasahithi Thanks for the patch, LGTM. Please take a look if you can add a test for this.
   
   Do you want a test for the atomicity check or for  in progress iteration stats reading the live metric?


-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


Re: [PR] HDDS-15656. Fix non-atomic data size accumulation in ContainerBalancer move callback [ozone]

Posted by "ashishkumar50 (via GitHub)" <gi...@apache.org>.
ashishkumar50 commented on PR #10708:
URL: https://github.com/apache/ozone/pull/10708#issuecomment-4976892444

   @sreejasahithi Thanks for the patch, @chihsuan @rich7420 for the review.


-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


Re: [PR] HDDS-15656. Fix non-atomic data size accumulation in ContainerBalancer move callback [ozone]

Posted by "chihsuan (via GitHub)" <gi...@apache.org>.
chihsuan commented on PR #10708:
URL: https://github.com/apache/ozone/pull/10708#issuecomment-4958159865

   > Do you want a test for the atomicity check or for in progress iteration stats reading the live metric? 
   
   Mainly, the concurrent accumulation regression. I think it would help ensure multiple move callbacks don’t silently lose bytes. If it’s easy to cover in the same test, checking that the in-progress stats reflect the live metric would be helpful too.


-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org