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

Siyao Meng updated HDDS-6696:
-----------------------------
    Description: 
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  [^HDDS-6696.repro.001.patch]  for a proof/repro.

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

CC [~ljain]

  was:
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]


> 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
>            Priority: Major
>         Attachments: HDDS-6696.repro.001.patch
>
>
> 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  [^HDDS-6696.repro.001.patch]  for a proof/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