You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Rust] close() on a failed stream drops queued ack-callback errors #1191
When a stream fails, the SDK queues one on_error call per pending record for the ack callback. If the caller then calls close(), it returns at once because the stream is already closed (rust/sdk/src/stream/grpc/close.rs), so it never waits for the callback task to deliver those calls. Dropping or freeing the stream then aborts the callback task, and the queued on_error calls are lost.
This affects every SDK with an ack callback, for ordinary and multiplexed streams. A caller that relies on on_error to learn which records failed misses some of them.
Proposed fix
On the already-closed path, close() still waits for pending callbacks, bounded by callback_max_wait_time_ms as on a normal close. Add a regression test: a stream with recovery disabled fails with records pending, the first on_error blocks, close() runs, and after it returns every on_error call has been delivered.
Activity