You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "Kyle Porter (Jira)" <ji...@apache.org> on 2020/11/02 17:20:00 UTC

[jira] [Commented] (ARROW-10441) [Java] Multiple FlightClients on a single channel can be closed accidentally

    [ https://issues.apache.org/jira/browse/ARROW-10441?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17224821#comment-17224821 ] 

Kyle Porter commented on ARROW-10441:
-------------------------------------

I defer to you as to where this should go, maybe 3.0.0?

> [Java] Multiple FlightClients on a single channel can be closed accidentally
> ----------------------------------------------------------------------------
>
>                 Key: ARROW-10441
>                 URL: https://issues.apache.org/jira/browse/ARROW-10441
>             Project: Apache Arrow
>          Issue Type: Bug
>          Components: Java
>    Affects Versions: 2.0.0
>            Reporter: Kyle Porter
>            Priority: Minor
>             Fix For: 2.0.1
>
>
> It seems there may be a mistake in the Java FlightClient where it's possible to create multiple FlightClients from a single ManagedChannel.
>  
> See [https://github.com/apache/arrow/blob/master/java/flight/flight-grpc/src/main/java/org/apache/arrow/flight/FlightGrpcUtils.java#L55] which lets you specify the channel. However, if you do create multiple FlightClients from a single channel, then calling close() (https://github.com/apache/arrow/blob/master/java/flight/flight-core/src/main/java/org/apache/arrow/flight/FlightClient.java#L503) on a single FlightClient will close the channel for all of the FlightClients that share that channel, which seems incorrect.
>  
> It's possible that the FlightGrpcUtils was intended only for testing purposes and this should never happen in practice. A few possible options would be to:
>  * This behaviour is intended, no action.
>  * Track if a channel is used by multiple clients and only close on the last client to close.
>  * Disallow creation of a FlightClient with a specified ManagedChannel.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)