curator icon indicating copy to clipboard operation
curator copied to clipboard

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

Open jira-importer opened this issue 4 years ago • 1 comments

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

jira-importer avatar Sep 20 '21 08:09 jira-importer

asingh97:

Added a class file that specifies the use case and the behavior. When the first call to unregisterService fails, there is an exception thrown that can be handled. However, on the next call, no such exception is thrown. Please refer to the startTest() method in the attached class file for the exact scenario.

jira-importer avatar Oct 19 '21 04:10 jira-importer