Uploaded image for project: 'Apache Curator'
  1. Apache Curator
  2. CURATOR-208

InterProcessSemaphoreV2 swallows InterruptedException

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.6.0, 2.7.1
    • 3.1.0, 2.10.0
    • Recipes

    Description

      InterProcessSemaphoreV2 incorrectly processes InterruptedException.

      Method `InterProcessSemaphoreV2#makeLease(final String path)` contains code block

                      try
                      {
                          client.delete().guaranteed().forPath(path);
                      }
                      catch ( KeeperException.NoNodeException e )
                      {
                          log.warn("Lease already released", e);
                      }
                      catch ( Exception e )
                      {
                          throw new IOException(e);
                      }
      

      The problem is that code in try block may throw an InterruptedException and this exception gets wrapped into IOException so it becomes very problematic to handle it properly.

      Attachments

        Issue Links

          Activity

            People

              randgalt Jordan Zimmerman
              AlexeiOsipov Alexei Osipov
              Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: