You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2026/05/16 04:45:00 UTC

[jira] [Updated] (HDDS-15290) DiskBalancer should write info file atomically

     [ https://issues.apache.org/jira/browse/HDDS-15290?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

ASF GitHub Bot updated HDDS-15290:
----------------------------------
    Labels: pull-request-available  (was: )

> DiskBalancer should write info file atomically
> ----------------------------------------------
>
>                 Key: HDDS-15290
>                 URL: https://issues.apache.org/jira/browse/HDDS-15290
>             Project: Apache Ozone
>          Issue Type: Improvement
>            Reporter: Shilun Fan
>            Assignee: Shilun Fan
>            Priority: Major
>              Labels: pull-request-available
>
> DiskBalancer persists its running configuration and state into diskBalancer.info on the datanode.
> Currently, DiskBalancerService overwrites diskBalancer.info by deleting the existing file first and then creating/writing the new file.
> If the process fails between deleting the old file and completing the new write, for example due to an IOException or datanode crash, the existing diskBalancer.info may be lost or left in an incomplete state.
> This can make DiskBalancer state recovery less reliable on datanode restart.
> The write path should be made atomic by writing the new DiskBalancerInfo into a temporary file in the same directory first, and then replacing the target diskBalancer.info using an atomic move. If writing the temporary file fails, the existing diskBalancer.info should remain unchanged.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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