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

Background retry may fall into infinite loop

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 4.0.0
    • None
    • Framework
    • None

    Description

      Similar to Curator-209, addFailedOperation() function in FailedOperationManager.java could fall into infinite loop when there's network disruption. 

      Root cause: when there's an Exception (any type), function addFailedOperation() simply recursively calls itself. And in every recursion, it prints a log.  

       

      void addFailedOperation(T details)
      {
        ...
        if ( client.getState() == CuratorFrameworkState.STARTED )
        {
          log.debug("Details being added to guaranteed operation set: " + details);
          try
          {
            executeGuaranteedOperationInBackground(details);
          }
          catch ( Exception e )
          {
            ThreadUtils.checkInterrupted(e);
            addFailedOperation(details);
          }
        }
      }
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            zagol Yongle Zhang
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: