You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@curator.apache.org by "Yongle Zhang (JIRA)" <ji...@apache.org> on 2018/02/06 01:18:00 UTC

[jira] [Created] (CURATOR-451) Background retry may fall into infinite loop

Yongle Zhang created CURATOR-451:
------------------------------------

             Summary: Background retry may fall into infinite loop
                 Key: CURATOR-451
                 URL: https://issues.apache.org/jira/browse/CURATOR-451
             Project: Apache Curator
          Issue Type: Bug
          Components: Framework
    Affects Versions: 4.0.0
            Reporter: Yongle Zhang


Similar to [Curator-209|https://issues.apache.org/jira/browse/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.  

 
{code:java}
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);
    }
  }
}
{code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)