Commits


David Li authored and Antoine Pitrou committed 32ef12c45b5
ARROW-6063: [FlightRPC] implement half-closed semantics for DoPut Implements [ARROW-6063](https://issues.apache.org/jira/browse/ARROW-6063) for C++/Python. In C++, gRPC reads are not thread-safe with respect to each other, but in DoPut, closing the writer (which was the only way for the client to indicate that it was done writing) would also execute reads (to prevent gRPC from hanging due to unread messages). This meant there was no way to asynchronously read application metadata during a DoPut. By explicitly introducing a "done writing" operation, the server can be notified that the client is done writing and shut down its side of the call, which then unblocks the read side of the client. This lets us run a background thread on the client to read from the channel, and block closing the reader/writer until the background thread is unblocked (by the server closing its side of the call). Longer term, the "right" solution is to introduce nonblocking/asynchronous operations in Flight. Personal Travis: https://travis-ci.com/lihalite/arrow/builds/124584278 Closes #5196 from lihalite/arrow-6063 and squashes the following commits: 796f155ac <David Li> Add locking around read operations on DoPut 248677d40 <David Li> Add flag to test DoPut perf instead of DoGet b669dbffc <David Li> Refactor out benchmark loop into function 0e291c7b6 <David Li> Wait for Flight perf server to be ready 82bc93fac <David Li> Guard against nullptr in ToProto for Action 2221b751f <David Li> ARROW-6063: implement half-closed semantics for DoPut Authored-by: David Li <li.davidm96@gmail.com> Signed-off-by: Antoine Pitrou <antoine@python.org>