File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff 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) ) )
You can’t perform that action at this time.
0 commit comments