curator
curator copied to clipboard
[CURATOR-451] Background retry may fall into infinite loop
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);
}
}
}
Originally reported by zagol, imported from: Background retry may fall into infinite loop
- status: Open
- priority: Major
- resolution: Unresolved
- imported: 2025-01-21