[
https://issues.apache.org/jira/browse/ARROW-2000?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16328256#comment-16328256
]
ASF GitHub Bot commented on ARROW-2000:
---------------------------------------
pcmoritz commented on a change in pull request #1479: ARROW-2000: [Plasma]
Deduplicate file descriptors when replying to GetRequest.
URL: https://github.com/apache/arrow/pull/1479#discussion_r161954277
##########
File path: cpp/src/plasma/protocol.cc
##########
@@ -76,27 +76,33 @@ Status ReadCreateRequest(uint8_t* data, size_t size,
ObjectID* object_id,
Status SendCreateReply(int sock, ObjectID object_id, PlasmaObject* object,
int error_code) {
flatbuffers::FlatBufferBuilder fbb;
- PlasmaObjectSpec plasma_object(object->handle.store_fd,
object->handle.mmap_size,
- object->data_offset, object->data_size,
- object->metadata_offset,
object->metadata_size);
+ PlasmaObjectSpec plasma_object(object->handle.store_fd, object->data_offset,
+ object->data_size, object->metadata_offset,
+ object->metadata_size);
auto message =
CreatePlasmaCreateReply(fbb, fbb.CreateString(object_id.binary()),
&plasma_object,
- static_cast<PlasmaError>(error_code));
+ static_cast<PlasmaError>(error_code),
+ object->handle.store_fd,
object->handle.mmap_size);
return PlasmaSend(sock, MessageType_PlasmaCreateReply, &fbb, message);
}
Status ReadCreateReply(uint8_t* data, size_t size, ObjectID* object_id,
- PlasmaObject* object) {
+ PlasmaObject* object, int* store_fd, int64_t*
mmap_size) {
DCHECK(data);
auto message = flatbuffers::GetRoot<PlasmaCreateReply>(data);
DCHECK(verify_flatbuffer(message, data, size));
*object_id = ObjectID::from_binary(message->object_id()->str());
object->handle.store_fd = message->plasma_object()->segment_index();
- object->handle.mmap_size = message->plasma_object()->mmap_size();
+ // TODO(rkn): Remove mmap_size from the plasma store's object table.
Review comment:
Can we do this as part of this PR? How hard is it?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> Deduplicate file descriptors when plasma store replies to get request.
> ----------------------------------------------------------------------
>
> Key: ARROW-2000
> URL: https://issues.apache.org/jira/browse/ARROW-2000
> Project: Apache Arrow
> Issue Type: Bug
> Components: Plasma (C++)
> Reporter: Robert Nishihara
> Assignee: Robert Nishihara
> Priority: Major
> Labels: pull-request-available
>
> Right now when the plasma store replies to a GetRequest from a client, it
> sends many file descriptors over the relevant socket (by calling
> {{send_fd}}). However, many of these file descriptors are redundant and so we
> should deduplicate them before sending.
>
> Note that I often see the error "Failed to send file descriptor, retrying."
> printed when getting around 100 objects from the store. This may alleviate
> that.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)