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

Curator masks/loses exception in LockInternals

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 5.6.0
    • Recipes
    • None

    Description

      private boolean internalLockLoop(long startMillis, Long millisToWait, String ourPath) throws Exception

      try

      { ... }

      catch ( Exception e )

      { doDelete = true; throw e; }

      finally
      {
      if ( doDelete )

      { deleteOurPath(ourPath); }

      }

      Say ... throws an exception. catch sets doDelete = true. Then deleteOurPath throws an exception. We never find out what the original exception was that caused the mutex to fail.

      In JDK8, I think we get the extra Throwable#getSuppressed() call, which will return us this extra exception, but we aren't on JDK8 yet.

      Attachments

        Issue Links

          Activity

            People

              kezhuw Kezhu Wang
              arren Shevek
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: