Uploaded image for project: 'Phoenix'
  1. Phoenix
  2. PHOENIX-1976

Improve PhoenixDriver registration when addShutdownHook fails

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.5.0, 4.4.1
    • Labels:
      None
    • Flags:
      Patch

      Description

      Noticed this in running some tests. RegionServer was shutting down and MetaDataRegionObserver was just invoking postOpen

      When the Class.forName(PhoenixDriver.class.getName()) gets called, the static initializer in PhoenixDriver gets invoked. Because the RegionServer is already stopping, the addShutdownHook fails with an IllegalArgumentException.

      It's not a huge concern because we know the JVM is going down, but there are a few things we could handle better:

      • Ensure the PhoenixDriver gets closed if the shutdown hook fails to register
      • Avoid registering the PhoenixDriver instance if we're shutting down

        Attachments

        1. PHOENIX-1976-master.patch
          4 kB
          Josh Elser

          Activity

            People

            • Assignee:
              elserj Josh Elser
              Reporter:
              elserj Josh Elser
            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: