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

Add error logging for inner thread pool

    XMLWordPrintableJSON

Details

    Description

      Although we have encapsulated ThreadPools in IOTDB, unexpected exceptions in the thread will be thrown without any logging. That may cause the issue tracking very hard.

      The Thread.UncaughtExceptionHandler is not worked in ThreadPoolExecutor.submit() and its subclasses, as the task in runWorker() is an instance of FutureTask, which will not throw any exception even if any error occurs in run(), and we can only get the exceptions in afterExecute. See the codes below:

      In FutureTask, we can see that the exceptions are caught, not thrown directly.

      Attachments

        1. image-2022-07-26-12-08-39-120.png
          112 kB
          Eric Pai
        2. image-2022-07-26-12-06-51-952.png
          246 kB
          Eric Pai

        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: