Repository navigation
[Rust] Add Arrow mux API - #866
Conversation
fbcdcbe to
846642f
Compare
cd29799 to
fe13be4
Compare
fe46935 to
e208838
Compare
fe13be4 to
9328853
Compare
e208838 to
71e31cb
Compare
9328853 to
fe13be4
Compare
71e31cb to
5e2aa6d
Compare
ebeb366 to
85a48bb
Compare
7876529 to
28e40c3
Compare
f55b303 to
8534e17
Compare
28e40c3 to
21a7300
Compare
8534e17 to
6ee8720
Compare
21a7300 to
117c993
Compare
97aa0ee to
48c4c0d
Compare
Move StreamBuilder::build into stream_builder/ephemeral.rs, and move multiplexed() and multiplexed_ack_callback() into multiplexed.rs, so mod.rs keeps the builder state and the setters that the persistent builder also uses. No public API or behavior change. The Arrow Flight setters and build_arrow() stay in mod.rs until the Arrow mux work in #866 lands. Addresses a review nit on #763. Co-authored-by: Isaac <no-reply@databricks.com> Signed-off-by: elenagaljak-db <elena.galjak@databricks.com>
Signed-off-by: danilo-najkov-db <danilo.najkov@databricks.com>
Signed-off-by: danilo-najkov-db <danilo.najkov@databricks.com>
Signed-off-by: danilo-najkov-db <danilo.najkov@databricks.com>
48c4c0d to
85c275b
Compare
48c4c0d to
85c275b
Compare
| .map(|(delay, headers_provider)| { | ||
| let table_properties = table_properties.clone(); | ||
| let options = options.clone(); | ||
| let stats_exporter = inner.stats_exporter.clone(); |
There was a problem hiding this comment.
Since every lane reports into this one exporter with its own lane-local offsets, the same offset shows up once per lane and none of them match the MessageId that ingest_batch returned. Totals still add up, but per-batch telemetry such as send-to-ack latency or retransmits cannot be tied to a batch.
It's probably best to leave stats off Arrow mux streams for now. We could reject stats_exporter in MultiplexedStreamBuilder::validate with InvalidArgument, as validate_common already does for gRPC formats and drop the shared-exporter wording from the docs? We can add it later.
As a follow-up, the ideal is probably for mux telemetry to use the same IDs as the rest of the mux API: wrap each lane's exporter so BatchSent and BatchAcked report MessageId::raw() instead of the lane-local offset, the same way multiplexed_ack_callback adapts gRPC lane offsets, and note on the offset docs that mux events carry a raw MessageId.
WDYT?
There was a problem hiding this comment.
yeah it doesn't make much sense currently with the message id. I agree its best to reject it in validate now and have a proper solution in a followup
Signed-off-by: danilo-najkov-db <danilo.najkov@databricks.com>
Signed-off-by: danilo-najkov-db <danilo.najkov@databricks.com>
Signed-off-by: danilo-najkov-db <danilo.najkov@databricks.com>
What changes are proposed in this pull request?
Add Rust-only multiplexed Arrow Flight ingestion through
.arrow(schema).multiplexed(n).build_arrow(), returningMultiplexedArrowStream. Whole RecordBatches route round-robin,MessageIdidentifies the lane and local batch offset, and the mux-widemax_inflight_batchesbudget is divided evenly among lanes. No global ordering is promised.Private Arrow reservation and admission hooks connect to the shared core from #865, inheriting its poisoning and cancellation handling. Close preserves an already-recorded mux failure; otherwise it returns the first observed lane-close error and logs additional errors. Arrow retains its recovery and close supervisor. All lanes share the stats exporter; events retain lane-local offsets. Arrow acknowledgment callbacks remain unsupported.
For standalone Arrow streams,
ingest_batchcalls blocked onmax_inflight_batchesnow fail as soon asclose()starts instead of waiting for close to finish. Other closed-admission checks retain the prompt rejection behavior already present in 2.10. Includes focused tests for both cases, builder validation, routing/IPC/message-ID/telemetry tests, API docs, a runnable example, and changelog entries. No FFI or wrapper API changes.Stack base: #865. Follow-up: #867 adds broader lifecycle and failure tests.
How is this tested?
make testandmake lintmatrices passed on the combined implementation, plus the standalone Avro mux regression.