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

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

pcmoritz commented on a change in pull request #1427: ARROW-1927: [Plasma] Add 
delete function
URL: https://github.com/apache/arrow/pull/1427#discussion_r157356846
 
 

 ##########
 File path: cpp/src/plasma/store.cc
 ##########
 @@ -411,6 +411,39 @@ int PlasmaStore::abort_object(const ObjectID& object_id, 
Client* client) {
   }
 }
 
+int PlasmaStore::delete_object(ObjectID& object_id) {
+    auto entry = get_object_table_entry(&store_info_, object_id);
+    // TODO(rkn): This should probably not fail, but should instead throw an
+    // error. Maybe we should also support deleting objects that have been
+    // created but not sealed.
+    if(entry == NULL) {
+    // To delete an object it must be in the object table.
+      return PlasmaError_ObjectNonexistent;
+    }
+
+    if(entry->state != PLASMA_SEALED) {
+    // To delete an object it must have been sealed.
 
 Review comment:
   comment indentation

----------------------------------------------------------------
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


> [Plasma] Implement delete function
> ----------------------------------
>
>                 Key: ARROW-1927
>                 URL: https://issues.apache.org/jira/browse/ARROW-1927
>             Project: Apache Arrow
>          Issue Type: Improvement
>          Components: Plasma (C++), Python
>            Reporter: Philipp Moritz
>              Labels: pull-request-available
>
> The function should check if the reference count of the object is zero and if 
> yes, delete it from the store. If no, it should raise an exception or return 
> a status value.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to