Uploaded image for project: 'ZooKeeper'
  1. ZooKeeper
  2. ZOOKEEPER-1907

Improve Thread handling

VotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.5.0
    • 3.4.7, 3.5.1, 3.6.0
    • server
    • None

    Description

      Server has many critical threads running and co-ordinating each other like RequestProcessor chains et. When going through each threads, most of them having the similar structure like:

      public void run() {
              try {
                    while(running)
                         // processing logic
                    }
              } catch (InterruptedException e) {
                  LOG.error("Unexpected interruption", e);
              } catch (Exception e) {
                  LOG.error("Unexpected exception", e);
              }
              LOG.info("...exited loop!");
      }
      

      From the design I could see, there could be a chance of silently leaving the thread by swallowing the exception. If this happens in the production, the server would get hanged forever and would not be able to deliver its role. Now its hard for the management tool to detect this.

      The idea of this JIRA is to discuss and imprv.

      Reference: Community discussion thread

      Attachments

        1. ZOOKEEPER-1907-br-3-4.patch
          23 kB
          Rakesh Radhakrishnan
        2. ZOOKEEPER-1907.patch
          34 kB
          Rakesh Radhakrishnan
        3. ZOOKEEPER-1907.patch
          35 kB
          Rakesh Radhakrishnan
        4. ZOOKEEPER-1907.patch
          33 kB
          Rakesh Radhakrishnan
        5. ZOOKEEPER-1907.patch
          39 kB
          Rakesh Radhakrishnan
        6. ZOOKEEPER-1907.patch
          38 kB
          Rakesh Radhakrishnan
        7. ZOOKEEPER-1907.patch
          35 kB
          Rakesh Radhakrishnan
        8. ZOOKEEPER-1907.patch
          28 kB
          Rakesh Radhakrishnan
        9. ZOOKEEPER-1907.patch
          24 kB
          Rakesh Radhakrishnan
        10. ZOOKEEPER-1907.patch
          24 kB
          Rakesh Radhakrishnan
        11. ZOOKEEPER-1907.patch
          23 kB
          Rakesh Radhakrishnan
        12. ZOOKEEPER-1907.patch
          19 kB
          Rakesh Radhakrishnan
        13. ZOOKEEPER-1907.patch
          20 kB
          Rakesh Radhakrishnan
        14. ZOOKEEPER-1907.patch
          19 kB
          Rakesh Radhakrishnan

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            rakeshr Rakesh Radhakrishnan
            rakeshr Rakesh Radhakrishnan
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Issue deployment