Siyao Meng created HDDS-6696:
--------------------------------

             Summary: BackgroundService schedules tasks back-to-back as it 
doesn't wait for task completion
                 Key: HDDS-6696
                 URL: https://issues.apache.org/jira/browse/HDDS-6696
             Project: Apache Ozone
          Issue Type: Bug
    Affects Versions: 1.3.0
            Reporter: Siyao Meng


HDDS-4231 removed the task result collection from {{PeriodicalTask#run()}}. 
This causes {{run()}} to return immediately after task dispatch.

As a side effect, the {{exec.scheduleWithFixedDelay()}} no longer works as 
intended (that the specified interval is supposed to be the one between +the 
end of first task execution+ and +the start of the next task+).

This makes it effectively the same as {{exec.scheduleAtFixedRate()}}, which 
might not be desired: Currently a very long running {{BackgroundService}} (i.e. 
run time exceeding the interval) will be triggered back-to-back. See attached 
unit test for a proof of repro.

Note: Found this bug together with [~erose] while working on HDDS-6371, where 
we utilized {{BackgroundService}}.

CC [~ljain]



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

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

Reply via email to