open-telemetry / otel-arrow

Protocol and libraries for sending and receiving OpenTelemetry data using Apache Arrow
Apache License 2.0
68 stars 13 forks source link

Call IPCReader.Err() after reader loop #215

Closed jmacd closed 3 months ago

jmacd commented 3 months ago

Part of #210.

This updates memory-limit error handling because, prior to this fix, there were two fallbacks.

(1) the use of os.Stderr to print the message that we had lost (2) a test for the expected number of records to match

The first is now removed (i.e. no printing to os.Stderr). The second is now an internal error.

The consumer is expected to test for the memory limit error explicitly (e.g., and handle it as ResourceExhausted). A new function is added to do this (NewLimitErrorFromError) that parses the message using a regexp. An upstream issue report and PR will be filed with Arrow-Go to overcome this in the future.

See https://github.com/apache/arrow/pull/41989.