You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@iotdb.apache.org by "Eric Pai (Jira)" <ji...@apache.org> on 2022/06/06 10:01:00 UTC

[jira] [Created] (IOTDB-3402) Abuse of ScheduledExecutorService.scheduleWithFixedDelay

Eric Pai created IOTDB-3402:
-------------------------------

             Summary: Abuse of ScheduledExecutorService.scheduleWithFixedDelay
                 Key: IOTDB-3402
                 URL: https://issues.apache.org/jira/browse/IOTDB-3402
             Project: Apache IoTDB
          Issue Type: Improvement
          Components: Core/Compaction, Core/WAL
            Reporter: Eric Pai
            Assignee: Eric Pai
             Fix For: master branch


The Java doc of _ScheduledExecutorService.scheduleWithFixedDelay_ describes as the below:

Creates and executes a periodic action that becomes enabled first after the given initial delay, and subsequently with the given delay between the termination of one execution and the commencement of the next. {+}*If any execution of the task encounters an exception, subsequent executions are suppressed*{+}. Otherwise, the task will only terminate via cancellation or termination of the executor.

So in IoTDB there're some important schedule tasks but without exception protection, which may be the risk of unexcepted non-schedule of them. We should fix it.

 

*{color:#172b4d}Note that{color}* _WrappedSingleThreadScheduledExecutor_ and _WrappedScheduledExecutorService_ should be unchanged as they are just the implementations of _ScheduledExecutorService_ and should obey the interface definition.



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