apache / apache/curator

[CURATOR-617] UnregisterService Method in ServiceDiscoveryImpl is non-Idempotent in case of connection-failure

Open
#1,134 1 comment 0 reactions 0 assignees View on GitHub
bug imported-jira-issue
Dominant language
Java
Stars
3.2k
Forks
1.2k
PR merge metrics
No merged PRs in 30d

Description

The unregisterService( ) method in ServiceDiscoveryImpl throws an unhandled KeeperException.ConnectionLossException the first time it is invoked while the server connection is down. The next time, however, the service has already been removed from the internal services cache. Hence the internalUnregisterService function does not proceed since the entry is null the second time around.

We are not using the blockUntilConnected option, and instead are trying to implement a local retry mechanism. We are dependent upon the ConnectionLossException to be thrown, in order to catch and evaluate it before retrying with an exponential back-off.

---
Originally reported by asingh97, imported from: UnregisterService Method in ServiceDiscoveryImpl is non-Idempotent in case of connection-failure


  • assignee: randgalt
  • status: Open
  • priority: Major
  • resolution: Unresolved
  • imported: 2025-01-21

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reading ServiceDiscoveryImpl.unregisterService and internalUnregisterService, then trace how a connection-loss failure changes the internal services cache. Reproduce the first unregister attempt while the server connection is down and add coverage showing that a retry can still perform the removal after the failure.

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
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.