Shilun Fan created HDDS-15371:
---------------------------------

             Summary: DiskBalancer should use monotonic time for delayed 
replica deletion
                 Key: HDDS-15371
                 URL: https://issues.apache.org/jira/browse/HDDS-15371
             Project: Apache Ozone
          Issue Type: Improvement
          Components: Ozone Datanode
            Reporter: Shilun Fan
            Assignee: Shilun Fan


DiskBalancer uses System.currentTimeMillis() to schedule and check delayed 
deletion of old replicas after a successful container move.

The delayed deletion is based on a relative delay configured by 
replicaDeletionDelay. Since System.currentTimeMillis() is wall-clock time, it 
can be affected by system clock changes such as NTP adjustment, manual time 
changes, or VM time drift.

If the system clock moves forward, old replicas may become eligible for 
deletion earlier than expected. If the system clock moves backward, old 
replicas may remain in the pending deletion queue longer than expected.

DiskBalancer already uses Time.monotonicNow() for other relative-time logic, 
such as bandwidth throttling with nextAvailableTime. The pending deletion delay 
should follow the same pattern and use monotonic time for both deadline 
calculation and expiration checks.

This makes delayed replica deletion independent of wall-clock changes and 
consistent with other DiskBalancer delay/elapsed-time logic.



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

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

Reply via email to