adamreeve opened a new issue, #44360:
URL: https://github.com/apache/arrow/issues/44360

   ### Describe the bug, including details regarding any error messages, 
version, and platform.
   
   A .NET Flight Server with a `DoExchange` method is incompatible with a 
PyArrow Flight client. The C# implementation expects the first message received 
from the data stream to contain both the descriptor and the schema, but the 
client first sends the descriptor with an empty `data_header`, followed by 
another message with the schema.
   
   This results in an error like this in the C# server:
   ```
   fail: Grpc.AspNetCore.Server.ServerCallHandler[6]
         Error when executing service method 'DoExchange'.
         System.ArgumentOutOfRangeException: Specified argument was out of the 
range of valid values. (Parameter 'length')
            at Google.FlatBuffers.ByteBuffer.GetUint(Int32 offset)
            at Google.FlatBuffers.ByteBuffer.GetInt(Int32 offset)
            at Apache.Arrow.Flatbuf.Message.GetRootAsMessage(ByteBuffer _bb, 
Message obj)
            at Apache.Arrow.Flatbuf.Message.GetRootAsMessage(ByteBuffer _bb)
            at 
Apache.Arrow.Flight.Internal.RecordBatchReaderImplementation.ReadSchemaAsync(CancellationToken
 cancellationToken)
            at 
Apache.Arrow.Flight.Internal.RecordBatchReaderImplementation.ReadFlightDescriptor()
            at 
ExchangeServer.Server.DoExchange(FlightServerRecordBatchStreamReader 
requestStream, FlightServerRecordBatchStreamWriter responseStream, 
ServerCallContext context) in 
/home/adam/dev/flight-exchange/DotnetExample/ExchangeServer/Server.cs:line 15
            at 
Grpc.Shared.Server.DuplexStreamingServerMethodInvoker`3.Invoke(HttpContext 
httpContext, ServerCallContext serverCallContext, IAsyncStreamReader`1 
requestStream, IServerStreamWriter`1 responseStream)
            at 
Grpc.Shared.Server.DuplexStreamingServerMethodInvoker`3.Invoke(HttpContext 
httpContext, ServerCallContext serverCallContext, IAsyncStreamReader`1 
requestStream, IServerStreamWriter`1 responseStream)
            at 
Grpc.AspNetCore.Server.Internal.CallHandlers.DuplexStreamingServerCallHandler`3.HandleCallAsyncCore(HttpContext
 httpContext, HttpContextServerCallContext serverCallContext)
            at 
Grpc.AspNetCore.Server.Internal.CallHandlers.ServerCallHandlerBase`3.<HandleCallAsync>g__AwaitHandleCall|8_0(HttpContextServerCallContext
 serverCallContext, Method`2 method, Task handleCall)
   ```
   
   ### Component(s)
   
   C#


-- 
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: issues-unsubscr...@arrow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to