kou commented on issue #41780:
URL: https://github.com/apache/arrow/issues/41780#issuecomment-2126157878

   Ah, I see. The following works. Is it OK? Or do we have more simpler way?
   
   ```diff
   diff --git a/cpp/src/arrow/flight/flight_benchmark.cc 
b/cpp/src/arrow/flight/flight_benchmark.cc
   index f53b1c6dce..057ef15c3c 100644
   --- a/cpp/src/arrow/flight/flight_benchmark.cc
   +++ b/cpp/src/arrow/flight/flight_benchmark.cc
   @@ -131,7 +131,8 @@ struct PerformanceStats {
    Status WaitForReady(FlightClient* client, const FlightCallOptions& 
call_options) {
      Action action{"ping", nullptr};
      for (int attempt = 0; attempt < 10; attempt++) {
   -    if (client->DoAction(call_options, action).ok()) {
   +    auto result_stream_result = client->DoAction(call_options, action);
   +    if (result_stream_result.ok() && (*result_stream_result)->Drain().ok()) 
{
          return Status::OK();
        }
        std::this_thread::sleep_for(std::chrono::milliseconds(1000));
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to