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

Avoid logging errors after curator framework is closed.

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • None
    • None

    Description

      When the following operations are performed in rapid succession, it can lead annoying errors being logged.

      • Create curator framework
      • Create leader latch
      • Start leader latch
      • Close leader latch
      • Close curator framework

      The errors happen because background processing queued by the leader latch is still in flight when the curator framework is closed. When these background ops try to access the closed curator framework the following exception happens. It would be nice if the messages were logged at debug after close.

      2018-06-01 17:35:52,095 [imps.CuratorFrameworkImpl] ERROR: Background exception was not retry-able or retry gave up
      java.lang.IllegalStateException: instance must be started before calling this method
      	at org.apache.curator.shaded.com.google.common.base.Preconditions.checkState(Preconditions.java:176)
      	at org.apache.curator.framework.imps.CuratorFrameworkImpl.delete(CuratorFrameworkImpl.java:359)
      	at org.apache.curator.framework.recipes.leader.LeaderLatch.setNode(LeaderLatch.java:666)
      	at org.apache.curator.framework.recipes.leader.LeaderLatch.access$300(LeaderLatch.java:64)
      	at org.apache.curator.framework.recipes.leader.LeaderLatch$4.processResult(LeaderLatch.java:492)
      	at org.apache.curator.framework.imps.CuratorFrameworkImpl.sendToBackgroundCallback(CuratorFrameworkImpl.java:749)
      	at org.apache.curator.framework.imps.CuratorFrameworkImpl.processBackgroundOperation(CuratorFrameworkImpl.java:522)
      	at org.apache.curator.framework.imps.CreateBuilderImpl.sendBackgroundResponse(CreateBuilderImpl.java:584)
      	at org.apache.curator.framework.imps.CreateBuilderImpl.access$900(CreateBuilderImpl.java:44)
      	at org.apache.curator.framework.imps.CreateBuilderImpl$6.processResult(CreateBuilderImpl.java:534)
      	at org.apache.zookeeper.ClientCnxn$EventThread.processEvent(ClientCnxn.java:607)
      	at org.apache.zookeeper.ClientCnxn$EventThread.run(ClientCnxn.java:505)
      

      Attachments

        Issue Links

          Activity

            People

              randgalt Jordan Zimmerman
              kturner Keith Turner
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated: