Uploaded image for project: 'Apache IoTDB'
  1. Apache IoTDB
  2. IOTDB-3402

Abuse of ScheduledExecutorService.scheduleWithFixedDelay

    XMLWordPrintableJSON

Details

    Description

      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.

       

      Note that WrappedSingleThreadScheduledExecutor and WrappedScheduledExecutorService should be unchanged as they are just the implementations of ScheduledExecutorService and should obey the interface definition.

      Attachments

        Issue Links

          Activity

            People

              ericpai Eric Pai
              ericpai Eric Pai
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: