[FlightRPC][Java] CallbackBackpressureStrategy should not rely on listener.isReady()
- Dominant language
- Java
- Stars
- 94
- Forks
- 152
- Avg merge
- 3d 16h
- Merged PRs (30d)
- 11
Description
According to the spec for , we can get into a state where the ready flag on the listener has already switched back to false by the time we execute the on ready handler.
We currently use the listener's ready flag after the ready handler to check if we received a spurious wake, but it's not reliable because of this. Instead we should use our own readiness flag that gets set within a synchronized block local to the CallbackBackpressureStrategy.
**Reporter**: [James Duong](https://issues.apache.org/jira/browse/ARROW-15876) / @jduo
**Note**: *This issue was originally created as [ARROW-15876](https://issues.apache.org/jira/browse/ARROW-15876). Please see the [migration documentation](https://github.com/apache/arrow/issues/14542) for further details.*
Contributor guide
Research direction
Start with CallbackBackpressureStrategy and the CallStreamObserver setOnReadyHandler specification linked in the issue. Trace how the listener readiness flag is checked after the ready handler, then verify that completion no longer depends on that listener flag and uses the strategy's synchronized readiness state.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- grpc, java
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100