Github user dragonsinth commented on a diff in the pull request:

    https://github.com/apache/curator/pull/23#discussion_r15485966
  
    --- Diff: 
curator-framework/src/main/java/org/apache/curator/framework/imps/CuratorFrameworkImpl.java
 ---
    @@ -722,39 +725,35 @@ public void retriesExhausted(OperationAndData<String> 
operationAndData)
     
         private <DATA_TYPE> void 
handleBackgroundOperationException(OperationAndData<DATA_TYPE> 
operationAndData, Throwable e)
         {
    -        do
    +        if ( (operationAndData != null) && RetryLoop.isRetryException(e) )
             {
    -            if ( (operationAndData != null) && 
RetryLoop.isRetryException(e) )
    +            if ( 
!Boolean.getBoolean(DebugUtils.PROPERTY_DONT_LOG_CONNECTION_ISSUES) )
    +            {
    +                log.debug("Retry-able exception received", e);
    +            }
    +            if ( 
client.getRetryPolicy().allowRetry(operationAndData.getThenIncrementRetryCount(),
 operationAndData.getElapsedTimeMs(), operationAndData) )
                 {
                     if ( 
!Boolean.getBoolean(DebugUtils.PROPERTY_DONT_LOG_CONNECTION_ISSUES) )
                     {
    -                    log.debug("Retry-able exception received", e);
    +                    log.debug("Retrying operation");
                     }
    -                if ( 
client.getRetryPolicy().allowRetry(operationAndData.getThenIncrementRetryCount(),
 operationAndData.getElapsedTimeMs(), operationAndData) )
    +                backgroundOperations.offer(operationAndData);
    +                return;
    +            }
    +            else
    +            {
    +                if ( 
!Boolean.getBoolean(DebugUtils.PROPERTY_DONT_LOG_CONNECTION_ISSUES) )
                     {
    -                    if ( 
!Boolean.getBoolean(DebugUtils.PROPERTY_DONT_LOG_CONNECTION_ISSUES) )
    -                    {
    -                        log.debug("Retrying operation");
    -                    }
    -                    backgroundOperations.offer(operationAndData);
    -                    break;
    +                    log.debug("Retry policy did not allow retry");
                     }
    -                else
    +                if ( operationAndData.getErrorCallback() != null )
                     {
    -                    if ( 
!Boolean.getBoolean(DebugUtils.PROPERTY_DONT_LOG_CONNECTION_ISSUES) )
    -                    {
    -                        log.debug("Retry policy did not allow retry");
    -                    }
    -                    if ( operationAndData.getErrorCallback() != null )
    -                    {
    -                        
operationAndData.getErrorCallback().retriesExhausted(operationAndData);
    -                    }
    +                    
operationAndData.getErrorCallback().retriesExhausted(operationAndData);
                     }
                 }
    -
    -            logError("Background exception was not retry-able or retry 
gave up", e);
             }
    -        while ( false );
    +
    +        logError("Background exception was not retry-able or retry gave 
up", e);
    --- End diff --
    
    Sure thing.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to