You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "Kyle Porter (Jira)" <ji...@apache.org> on 2020/10/30 22:20:00 UTC
[jira] [Created] (ARROW-10441) Multiple FlightClients on a single
channel can be closed accidentally
Kyle Porter created ARROW-10441:
-----------------------------------
Summary: 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
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)