[jira] [Commented] (ARROW-1927) [Plasma] Implement delete function

2018-01-15 Thread ASF GitHub Bot (JIRA)

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

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

JinHai-CN commented on issue #1427: ARROW-1927: [Plasma] Add delete function
URL: https://github.com/apache/arrow/pull/1427#issuecomment-357692885
 
 
   @wesm ID: jinhai


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
>Priority: Major
>  Labels: pull-request-available
> Fix For: 0.9.0
>
>
> 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
(v7.6.3#76005)


[jira] [Commented] (ARROW-1927) [Plasma] Implement delete function

2018-01-11 Thread ASF GitHub Bot (JIRA)

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

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

wesm commented on issue #1427: ARROW-1927: [Plasma] Add delete function
URL: https://github.com/apache/arrow/pull/1427#issuecomment-357097036
 
 
   @JinHai-CN could you let me know your JIRA id on the ASF JIRA so I can 
assign this issue to you?


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
> Fix For: 0.9.0
>
>
> 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)


[jira] [Commented] (ARROW-1927) [Plasma] Implement delete function

2018-01-10 Thread ASF GitHub Bot (JIRA)

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

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

pcmoritz commented on issue #1427: ARROW-1927: [Plasma] Add delete function
URL: https://github.com/apache/arrow/pull/1427#issuecomment-356773804
 
 
   Yeah, let's do this as a followup PR


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
> Fix For: 0.9.0
>
>
> 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)


[jira] [Commented] (ARROW-1927) [Plasma] Implement delete function

2018-01-10 Thread ASF GitHub Bot (JIRA)

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

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

pcmoritz closed pull request #1427: ARROW-1927: [Plasma] Add delete function
URL: https://github.com/apache/arrow/pull/1427
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/cpp/src/plasma/client.cc b/cpp/src/plasma/client.cc
index 0dd1c44d7..d74c0f412 100644
--- a/cpp/src/plasma/client.cc
+++ b/cpp/src/plasma/client.cc
@@ -513,9 +513,20 @@ Status PlasmaClient::Abort(const ObjectID& object_id) {
 }
 
 Status PlasmaClient::Delete(const ObjectID& object_id) {
-  // TODO(rkn): In the future, we can use this method to give hints to the
-  // eviction policy about when an object will no longer be needed.
-  return Status::NotImplemented("PlasmaClient::Delete is not implemented.");
+  RETURN_NOT_OK(FlushReleaseHistory());
+  // If the object is in used, client can't send the remove message.
+  if (objects_in_use_.count(object_id) > 0) {
+return Status::UnknownError("PlasmaClient::Object is in use.");
+  } else {
+// If we don't already have a reference to the object, we can try to 
remove the object
+RETURN_NOT_OK(SendDeleteRequest(store_conn_, object_id));
+std::vector buffer;
+RETURN_NOT_OK(PlasmaReceive(store_conn_, MessageType_PlasmaDeleteReply, 
));
+ObjectID object_id2;
+DCHECK_GT(buffer.size(), 0);
+RETURN_NOT_OK(ReadDeleteReply(buffer.data(), buffer.size(), _id2));
+return Status::OK();
+  }
 }
 
 Status PlasmaClient::Evict(int64_t num_bytes, int64_t& num_bytes_evicted) {
diff --git a/cpp/src/plasma/client.h b/cpp/src/plasma/client.h
index 78793f1a7..35182f840 100644
--- a/cpp/src/plasma/client.h
+++ b/cpp/src/plasma/client.h
@@ -174,7 +174,8 @@ class ARROW_EXPORT PlasmaClient {
   Status Seal(const ObjectID& object_id);
 
   /// Delete an object from the object store. This currently assumes that the
-  /// object is present and has been sealed.
+  /// object is present, has been sealed and not used by another client. 
Otherwise,
+  /// it is a no operation.
   ///
   /// @todo We may want to allow the deletion of objects that are not present 
or
   ///   haven't been sealed.
diff --git a/cpp/src/plasma/eviction_policy.cc 
b/cpp/src/plasma/eviction_policy.cc
index a7758fd2c..66a3b2ea2 100644
--- a/cpp/src/plasma/eviction_policy.cc
+++ b/cpp/src/plasma/eviction_policy.cc
@@ -102,4 +102,14 @@ 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);
+
+  auto entry = store_info_->objects[object_id].get();
+  int64_t size = entry->info.data_size + entry->info.metadata_size;
+  ARROW_CHECK(memory_used_ >= size);
+  memory_used_ -= size;
+}
+
 }  // namespace plasma
diff --git a/cpp/src/plasma/eviction_policy.h b/cpp/src/plasma/eviction_policy.h
index cebf35b1c..b07630955 100644
--- a/cpp/src/plasma/eviction_policy.h
+++ b/cpp/src/plasma/eviction_policy.h
@@ -120,6 +120,11 @@ class EvictionPolicy {
   int64_t choose_objects_to_evict(int64_t num_bytes_required,
   std::vector* objects_to_evict);
 
+  /// This method will be called when an object is going to be removed
+  ///
+  /// @param object_id The ID of the object that is now being used.
+  void remove_object(const ObjectID& object_id);
+
  private:
   /// The amount of memory (in bytes) currently being used.
   int64_t memory_used_;
diff --git a/cpp/src/plasma/format/plasma.fbs b/cpp/src/plasma/format/plasma.fbs
index b6d03b8a3..ea6dc8bb9 100644
--- a/cpp/src/plasma/format/plasma.fbs
+++ b/cpp/src/plasma/format/plasma.fbs
@@ -76,7 +76,11 @@ enum PlasmaError:int {
   // Trying to access an object that doesn't exist.
   ObjectNonexistent,
   // Trying to create an object but there isn't enough space in the store.
-  OutOfMemory
+  OutOfMemory,
+  // Trying to delete an object but it's not sealed.
+  ObjectNotSealed,
+  // Trying to delete an object but it's in use.
+  ObjectInUse
 }
 
 // Plasma store messages
diff --git a/cpp/src/plasma/store.cc b/cpp/src/plasma/store.cc
index c6a19a547..dde7f9cdf 100644
--- a/cpp/src/plasma/store.cc
+++ b/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(_info_, object_id);
+  // TODO(rkn): This should probably not fail, but should instead throw an
+  // error. Maybe we 

[jira] [Commented] (ARROW-1927) [Plasma] Implement delete function

2018-01-10 Thread ASF GitHub Bot (JIRA)

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

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

robertnishihara commented on issue #1427: ARROW-1927: [Plasma] Add delete 
function
URL: https://github.com/apache/arrow/pull/1427#issuecomment-356773400
 
 
   We should also expose this through Python and add Python tests.


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
> Fix For: 0.9.0
>
>
> 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)


[jira] [Commented] (ARROW-1927) [Plasma] Implement delete function

2018-01-10 Thread ASF GitHub Bot (JIRA)

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

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

pcmoritz commented on issue #1427: ARROW-1927: [Plasma] Add delete function
URL: https://github.com/apache/arrow/pull/1427#issuecomment-356773007
 
 
   +1 This looks good. The test failure looks unrelated (the node.js tests are 
failing a lot)


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
> Fix For: 0.9.0
>
>
> 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)


[jira] [Commented] (ARROW-1927) [Plasma] Implement delete function

2017-12-20 Thread ASF GitHub Bot (JIRA)

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

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_r158150766
 
 

 ##
 File path: cpp/src/plasma/client.cc
 ##
 @@ -501,9 +501,20 @@ Status PlasmaClient::Abort(const ObjectID& object_id) {
 }
 
 Status PlasmaClient::Delete(const ObjectID& object_id) {
-  // TODO(rkn): In the future, we can use this method to give hints to the
-  // eviction policy about when an object will no longer be needed.
-  return Status::NotImplemented("PlasmaClient::Delete is not implemented.");
+  RETURN_NOT_OK(FlushReleaseHistory());
+  // If the object is in used, client can't send the remove message.
+  if (objects_in_use_.count(object_id) > 0) {
+return Status::UnknownError("PlasmaClient::Object is in used.");
+  } else {
+// If we don't already have a reference to the object, we can try to 
remove the object
+RETURN_NOT_OK(SendDeleteRequest(store_conn_, object_id));
+std::vector buffer;
+RETURN_NOT_OK(PlasmaReceive(store_conn_, MessageType_PlasmaDeleteReply, 
));
 
 Review comment:
   Ok, let's try out this approach and see if it's useful, though I think we 
should consider switching to "hint" semantics at some point.


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)


[jira] [Commented] (ARROW-1927) [Plasma] Implement delete function

2017-12-19 Thread ASF GitHub Bot (JIRA)

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

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

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

 ##
 File path: cpp/src/plasma/client.cc
 ##
 @@ -501,9 +501,20 @@ Status PlasmaClient::Abort(const ObjectID& object_id) {
 }
 
 Status PlasmaClient::Delete(const ObjectID& object_id) {
-  // TODO(rkn): In the future, we can use this method to give hints to the
-  // eviction policy about when an object will no longer be needed.
-  return Status::NotImplemented("PlasmaClient::Delete is not implemented.");
+  RETURN_NOT_OK(FlushReleaseHistory());
+  // If the object is in used, client can't send the remove message.
+  if (objects_in_use_.count(object_id) > 0) {
+return Status::UnknownError("PlasmaClient::Object is in used.");
+  } else {
+// If we don't already have a reference to the object, we can try to 
remove the object
+RETURN_NOT_OK(SendDeleteRequest(store_conn_, object_id));
+std::vector buffer;
+RETURN_NOT_OK(PlasmaReceive(store_conn_, MessageType_PlasmaDeleteReply, 
));
 
 Review comment:
   Yes, just update operation. And it can be implemented as: check contains, 
delete, check contains again to make it happen. 
   Currently, only two reasons: not sealed object and object is in use will 
make the DELETE operation failed. We can make it as non-blocking API. But when 
I look at other APIs such as CREATE, they also will provide the reply to the 
client. I think DELETE operation should follow the same way as CREATE operation.


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)


[jira] [Commented] (ARROW-1927) [Plasma] Implement delete function

2017-12-19 Thread ASF GitHub Bot (JIRA)

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

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_r157917179
 
 

 ##
 File path: cpp/src/plasma/client.cc
 ##
 @@ -501,9 +501,20 @@ Status PlasmaClient::Abort(const ObjectID& object_id) {
 }
 
 Status PlasmaClient::Delete(const ObjectID& object_id) {
-  // TODO(rkn): In the future, we can use this method to give hints to the
-  // eviction policy about when an object will no longer be needed.
-  return Status::NotImplemented("PlasmaClient::Delete is not implemented.");
+  RETURN_NOT_OK(FlushReleaseHistory());
+  // If the object is in used, client can't send the remove message.
+  if (objects_in_use_.count(object_id) > 0) {
+return Status::UnknownError("PlasmaClient::Object is in used.");
+  } else {
+// If we don't already have a reference to the object, we can try to 
remove the object
+RETURN_NOT_OK(SendDeleteRequest(store_conn_, object_id));
+std::vector buffer;
+RETURN_NOT_OK(PlasmaReceive(store_conn_, MessageType_PlasmaDeleteReply, 
));
 
 Review comment:
   Can you describe the use case?
   
   If you view the command as more of a "hint" that doesn't necessarily do 
anything but simply gives the plasma store more information that it can make 
use of, then a non-blocking API is natural.


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)


[jira] [Commented] (ARROW-1927) [Plasma] Implement delete function

2017-12-19 Thread ASF GitHub Bot (JIRA)

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

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

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

 ##
 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:
   Yes, fixed.


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)


[jira] [Commented] (ARROW-1927) [Plasma] Implement delete function

2017-12-19 Thread ASF GitHub Bot (JIRA)

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

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

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

 ##
 File path: cpp/src/plasma/client.cc
 ##
 @@ -501,9 +501,20 @@ Status PlasmaClient::Abort(const ObjectID& object_id) {
 }
 
 Status PlasmaClient::Delete(const ObjectID& object_id) {
-  // TODO(rkn): In the future, we can use this method to give hints to the
-  // eviction policy about when an object will no longer be needed.
-  return Status::NotImplemented("PlasmaClient::Delete is not implemented.");
+  RETURN_NOT_OK(FlushReleaseHistory());
+  // If the object is in used, client can't send the remove message.
+  if (objects_in_use_.count(object_id) > 0) {
+return Status::UnknownError("PlasmaClient::Object is in used.");
+  } else {
+// If we don't already have a reference to the object, we can try to 
remove the object
+RETURN_NOT_OK(SendDeleteRequest(store_conn_, object_id));
+std::vector buffer;
+RETURN_NOT_OK(PlasmaReceive(store_conn_, MessageType_PlasmaDeleteReply, 
));
 
 Review comment:
   Providing a blocked API is the most common thinking. If delete operation 
failed,  client also need to know why the delete operation failed and do the 
next step according to the reason.


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)


[jira] [Commented] (ARROW-1927) [Plasma] Implement delete function

2017-12-19 Thread ASF GitHub Bot (JIRA)

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

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

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

 ##
 File path: cpp/src/plasma/client.cc
 ##
 @@ -501,9 +501,20 @@ Status PlasmaClient::Abort(const ObjectID& object_id) {
 }
 
 Status PlasmaClient::Delete(const ObjectID& object_id) {
-  // TODO(rkn): In the future, we can use this method to give hints to the
-  // eviction policy about when an object will no longer be needed.
-  return Status::NotImplemented("PlasmaClient::Delete is not implemented.");
+  RETURN_NOT_OK(FlushReleaseHistory());
+  // If the object is in used, client can't send the remove message.
+  if (objects_in_use_.count(object_id) > 0) {
+return Status::UnknownError("PlasmaClient::Object is in used.");
 
 Review comment:
   Yes, fixed


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)


[jira] [Commented] (ARROW-1927) [Plasma] Implement delete function

2017-12-19 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/ARROW-1927?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=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:
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)


[jira] [Commented] (ARROW-1927) [Plasma] Implement delete function

2017-12-19 Thread ASF GitHub Bot (JIRA)

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

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_r157910215
 
 

 ##
 File path: cpp/src/plasma/client.cc
 ##
 @@ -501,9 +501,20 @@ Status PlasmaClient::Abort(const ObjectID& object_id) {
 }
 
 Status PlasmaClient::Delete(const ObjectID& object_id) {
-  // TODO(rkn): In the future, we can use this method to give hints to the
-  // eviction policy about when an object will no longer be needed.
-  return Status::NotImplemented("PlasmaClient::Delete is not implemented.");
+  RETURN_NOT_OK(FlushReleaseHistory());
+  // If the object is in used, client can't send the remove message.
+  if (objects_in_use_.count(object_id) > 0) {
+return Status::UnknownError("PlasmaClient::Object is in used.");
 
 Review comment:
   The error should probably just be `"Object is in use."`


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)


[jira] [Commented] (ARROW-1927) [Plasma] Implement delete function

2017-12-19 Thread ASF GitHub Bot (JIRA)

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

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_r157910600
 
 

 ##
 File path: cpp/src/plasma/client.cc
 ##
 @@ -501,9 +501,20 @@ Status PlasmaClient::Abort(const ObjectID& object_id) {
 }
 
 Status PlasmaClient::Delete(const ObjectID& object_id) {
-  // TODO(rkn): In the future, we can use this method to give hints to the
-  // eviction policy about when an object will no longer be needed.
-  return Status::NotImplemented("PlasmaClient::Delete is not implemented.");
+  RETURN_NOT_OK(FlushReleaseHistory());
+  // If the object is in used, client can't send the remove message.
+  if (objects_in_use_.count(object_id) > 0) {
+return Status::UnknownError("PlasmaClient::Object is in used.");
+  } else {
+// If we don't already have a reference to the object, we can try to 
remove the object
+RETURN_NOT_OK(SendDeleteRequest(store_conn_, object_id));
+std::vector buffer;
+RETURN_NOT_OK(PlasmaReceive(store_conn_, MessageType_PlasmaDeleteReply, 
));
 
 Review comment:
   What do you think about not having the plasma store reply to the client? The 
client could just continue on. If it really wants to know whether the object 
was deleted or not, it can call `Contains` to check.
   
   Are there use cases where you really want to know if the object was deleted 
or 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


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


[jira] [Commented] (ARROW-1927) [Plasma] Implement delete function

2017-12-16 Thread ASF GitHub Bot (JIRA)

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

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

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

 ##
 File path: cpp/src/plasma/client.cc
 ##
 @@ -501,9 +501,19 @@ Status PlasmaClient::Abort(const ObjectID& object_id) {
 }
 
 Status PlasmaClient::Delete(const ObjectID& object_id) {
 
 Review comment:
   No, it doesn't guarantee the object will be deleted for some reasons.


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)


[jira] [Commented] (ARROW-1927) [Plasma] Implement delete function

2017-12-16 Thread ASF GitHub Bot (JIRA)

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

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

JinHai-CN commented on issue #1427: ARROW-1927: [Plasma] Add delete function
URL: https://github.com/apache/arrow/pull/1427#issuecomment-352229791
 
 
   Yes, I will try to create the unit test cases in next commitment.
   
   > On 17 Dec 2017, at 11:40 AM, Philipp Moritz  
wrote:
   > 
   > @pcmoritz commented on this pull request.
   > 
   > Hey, this looks good, thanks for the contribution! Can you please also 
create a unit test that tests the following two scenarios:
   > 
   > make sure an error is raised if the object is in use
   > test the "normal" case where the object is not in use and make sure it was 
actually deleted (maybe by trying to create an object with the same object id)
   > maybe test what happens if an object is deleted that doesn't exist yet.
   > —
   > You are receiving this because you authored the thread.
   > Reply to this email directly, view it on GitHub 
, or mute 
the thread 
.
   > 
   
   


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)


[jira] [Commented] (ARROW-1927) [Plasma] Implement delete function

2017-12-16 Thread ASF GitHub Bot (JIRA)

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

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

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

 ##
 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) {
 
 Review comment:
   To be honest, they are similar. But in delete_object will issue the error 
status to client if delete object failed. As for delete_objects used by evict 
objects function, I don't want to impact it too much.


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)


[jira] [Commented] (ARROW-1927) [Plasma] Implement delete function

2017-12-16 Thread ASF GitHub Bot (JIRA)

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

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_r157356867
 
 

 ##
 File path: cpp/src/plasma/client.cc
 ##
 @@ -501,9 +501,19 @@ Status PlasmaClient::Abort(const ObjectID& object_id) {
 }
 
 Status PlasmaClient::Delete(const ObjectID& object_id) {
-  // TODO(rkn): In the future, we can use this method to give hints to the
-  // eviction policy about when an object will no longer be needed.
-  return Status::NotImplemented("PlasmaClient::Delete is not implemented.");
+  // If the object is in used, client can't send the remove message.
+  if (objects_in_use_.count(object_id) > 0) {
+return Status::UnknownError("PlasmaClient::Object is in used.");
 
 Review comment:
   Shall we create a custom error for this so it can be caught in Python?
   
   cc @wesm 


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)


[jira] [Commented] (ARROW-1927) [Plasma] Implement delete function

2017-12-16 Thread ASF GitHub Bot (JIRA)

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

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_r157356837
 
 

 ##
 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) {
 
 Review comment:
   Given that we already have a `delete_objects` method, does it make sense to 
also have a `delete_object` method? Is the behavior of this method different 
from calling `delete_objects` on a vector of one object ID?


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)


[jira] [Commented] (ARROW-1927) [Plasma] Implement delete function

2017-12-16 Thread ASF GitHub Bot (JIRA)

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

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_r157356806
 
 

 ##
 File path: cpp/src/plasma/client.cc
 ##
 @@ -501,9 +501,19 @@ Status PlasmaClient::Abort(const ObjectID& object_id) {
 }
 
 Status PlasmaClient::Delete(const ObjectID& object_id) {
 
 Review comment:
   In `client.h` we should probably clarify the behavior of this method. In 
particular, if a client calls `Delete`, that does not guarantee that the object 
will be deleted. In particular, if the object is in use by another client, then 
the `Delete` call is a no-op, right? Can you mention this in the documentation 
for this method in `client.h`?


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)


[jira] [Commented] (ARROW-1927) [Plasma] Implement delete function

2017-12-16 Thread ASF GitHub Bot (JIRA)

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

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_r157356848
 
 

 ##
 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(_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.
+  return PlasmaError_ObjectNotSealed;
+}
+
+if(entry->clients.size() != 0) {
+// To delete an object, there must be no clients currently using it.
 
 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)


[jira] [Commented] (ARROW-1927) [Plasma] Implement delete function

2017-12-16 Thread ASF GitHub Bot (JIRA)

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

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_r157356844
 
 

 ##
 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(_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.
 
 Review comment:
   comment should be indented as much as the following line


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)


[jira] [Commented] (ARROW-1927) [Plasma] Implement delete function

2017-12-16 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/ARROW-1927?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=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(_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)


[jira] [Commented] (ARROW-1927) [Plasma] Implement delete function

2017-12-16 Thread ASF GitHub Bot (JIRA)

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

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

JinHai-CN opened a new pull request #1427: ARROW-1927: [Plasma] Add delete 
function
URL: https://github.com/apache/arrow/pull/1427
 
 
   Hi, I just add the delete function for Plasma and tested. JIRA ticked:
   https://issues.apache.org/jira/browse/ARROW-1927
   


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)