[CURATOR-451] Background retry may fall into infinite loop
- Dominant language
- Java
- Stars
- 3.2k
- Forks
- 1.2k
- PR merge metrics
- No merged PRs in 30d
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);
}
}
}
---
Originally reported by zagol, imported from: Background retry may fall into infinite loop
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in FailedOperationManager.java at addFailedOperation() and follow its call to executeGuaranteedOperationInBackground(details), comparing the retry path with the behavior described for network disruption. Done means a failed background operation no longer causes unbounded recursive retries or repeated logging while the retry behavior remains handled.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- distributed-systems
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 38/100