Uploaded image for project: 'Ratis'
  1. Ratis
  2. RATIS-1785

Use SingleThreadExecutor to manage the lifetime of single thread

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 3.0.0, 2.5.0
    • server
    • None

    Description

      While the current SegmentedRaftLogWorker still uses the very primitive Thread management approach of `new Thread`, we can use the more mature approach of `newSingleThreadExecutor` to manage the lifetime of single thread.

      In addition, we also can override all `Executors.newSingleThreadExecutor()`, and gives corresponding thread name only for one thread.

      This work helps to make the code cleaner

      Attachments

        Issue Links

          Activity

            People

              tanxinyu Xinyu Tan
              tanxinyu Xinyu Tan
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 0.5h
                  0.5h