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

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

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

 ##########
 File path: cpp/src/plasma/eviction_policy.cc
 ##########
 @@ -102,4 +102,9 @@ void EvictionPolicy::end_object_access(const ObjectID& 
object_id,
   cache_.add(object_id, entry->info.data_size + entry->info.metadata_size);
 }
 
+void EvictionPolicy::remove_object(const ObjectID& object_id) {
+  /* If the object is in the LRU cache, remove it. */
+  cache_.remove(object_id);
 
 Review comment:
   I think we also need to update the `memory_used_` field.

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


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