You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "James Duong (Jira)" <ji...@apache.org> on 2022/03/09 00:22:00 UTC

[jira] [Created] (ARROW-15876) [FlightRPC][Java] CallbackBackpressureStrategy should not rely on listener.isReady()

James Duong created ARROW-15876:
-----------------------------------

             Summary: [FlightRPC][Java] CallbackBackpressureStrategy should not rely on listener.isReady()
                 Key: ARROW-15876
                 URL: https://issues.apache.org/jira/browse/ARROW-15876
             Project: Apache Arrow
          Issue Type: Bug
          Components: FlightRPC, Java
            Reporter: James Duong


According to the spec for [https://grpc.github.io/grpc-java/javadoc/io/grpc/stub/CallStreamObserver.html#setOnReadyHandler-java.lang.Runnable-] , 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.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)