You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "pitrou (via GitHub)" <gi...@apache.org> on 2023/05/31 09:05:48 UTC

[GitHub] [arrow] pitrou commented on a diff in pull request #35679: GH-32276: [C++][FlightRPC] Align buffers from Flight

pitrou commented on code in PR #35679:
URL: https://github.com/apache/arrow/pull/35679#discussion_r1211334600


##########
cpp/src/arrow/flight/transport/grpc/serialization_internal.cc:
##########
@@ -380,6 +382,14 @@ ::grpc::Status FlightDataDeserialize(ByteBuffer* buffer,
           return ::grpc::Status(::grpc::StatusCode::INTERNAL,
                                 "Unable to read FlightData body");
         }
+        // XXX: due to where we sit, we can't use a custom allocator
+        // XXX: any error here will likely crash or hang gRPC!
+        auto status =
+            util::EnsureAlignment(std::move(out->body), 64, default_memory_pool())

Review Comment:
   Isn't 64 a bit heavy-handed? Basically, and assuming the distribution of gRPC slice alignments is uniform, we will reallocate almost all incoming buffers?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org