Skip to content

Commit 4f87e30

Browse files
committed
fmt
1 parent 82ac1f0 commit 4f87e30

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/flight_service/do_get.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,14 @@ impl ArrowFlightEndpoint {
152152
// Note that we do garbage collection of unused dictionary values above, so we are not sending
153153
// unused dictionary values over the wire.
154154
.with_dictionary_handling(DictionaryHandling::Resend)
155+
// Set max flight data size to unlimited.
156+
// This requires servers and clients to also be configured to handle unlimited sizes.
157+
// Using unlimited sizes avoids splitting RecordBatches into multiple FlightData messages,
158+
// which could add significant overhead for large RecordBatches.
159+
// The only reason to split them really is if the client/server are configured with a message size limit,
160+
// which mainly makes sense in a public network scenario where you want to avoid DoS attacks.
161+
// Since all of our Arrow Flight communication happens within trusted data plane networks,
162+
// we can safely use unlimited sizes here.
155163
.with_max_flight_data_size(usize::MAX)
156164
.build(stream.map_err(|err| {
157165
FlightError::Tonic(Box::new(datafusion_error_to_tonic_status(&err)))

0 commit comments

Comments
 (0)