`releaseAsync()` for reserved connections is not idempotent
- Dominant language
- Java
- Stars
- 1k
- Forks
- 229
- Avg merge
- 23h 23m
- Merged PRs (30d)
- 16
Description
`releaseAsync()` is advertised as idempotent but we do not allow subscribing twice to it. In order to simplify user control flow, we should make `releaseAsync()` idempotent just like `closeAsync()`. Otherwise users have to take precautions while releasing.
A typical usecase would be to release the connection on any of the terminal events: cancel, complete, error. If `releaseAsync()` is not idempotent, users have to protect subscribing to `releaseAsync()` in these 3 cases.
Contributor guide
Research direction
Start by locating the reserved-connection implementation of `releaseAsync()` and compare its behavior with `closeAsync()`. Trace how repeated subscriptions are handled and add or update focused tests for the terminal-event use case. Done means multiple subscriptions to `releaseAsync()` are safe and the existing release behavior remains correct.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend, networking
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100