[ 
https://issues.apache.org/jira/browse/ARROW-2494?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16447855#comment-16447855
 ] 

ASF GitHub Bot commented on ARROW-2494:
---------------------------------------

pitrou commented on a change in pull request #1932: ARROW-2494: [C++] Return 
status codes from PlasmaClient::Seal instead of crashing
URL: https://github.com/apache/arrow/pull/1932#discussion_r183333281
 
 

 ##########
 File path: cpp/src/plasma/client.cc
 ##########
 @@ -604,10 +604,16 @@ Status PlasmaClient::Seal(const ObjectID& object_id) {
   // Make sure this client has a reference to the object before sending the
   // request to Plasma.
   auto object_entry = objects_in_use_.find(object_id);
-  ARROW_CHECK(object_entry != objects_in_use_.end())
-      << "Plasma client called seal an object without a reference to it";
-  ARROW_CHECK(!object_entry->second->is_sealed)
-      << "Plasma client called seal an already sealed object";
+
+  if (object_entry == objects_in_use_.end()) {
+    return Status::PlasmaObjectNonexistent(
+        "Plasma client called seal an object without a reference to it");
 
 Review comment:
   If there's a function to pretty-print object IDs when why not :-)

----------------------------------------------------------------
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:
us...@infra.apache.org


> Return status codes from PlasmaClient::Seal
> -------------------------------------------
>
>                 Key: ARROW-2494
>                 URL: https://issues.apache.org/jira/browse/ARROW-2494
>             Project: Apache Arrow
>          Issue Type: Sub-task
>          Components: C++
>            Reporter: Krisztian Szucs
>            Assignee: Krisztian Szucs
>            Priority: Major
>              Labels: pull-request-available
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to