You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2018/03/29 22:23:35 UTC

[GitHub] merlimat commented on a change in pull request #1450: Added multiple position delete in ManagedLedger

merlimat commented on a change in pull request #1450: Added multiple position delete in ManagedLedger
URL: https://github.com/apache/incubator-pulsar/pull/1450#discussion_r178197237
 
 

 ##########
 File path: managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedCursorImpl.java
 ##########
 @@ -1494,71 +1503,67 @@ public void deleteFailed(ManagedLedgerException exception, Object ctx) {
         }
     }
 
-    @Override
-    public void asyncDelete(Position pos, final AsyncCallbacks.DeleteCallback callback, Object ctx) {
-        checkArgument(pos instanceof PositionImpl);
 
-        if (STATE_UPDATER.get(this) == State.Closed) {
+    @Override
+    public void asyncDelete(Iterable<Position> positions, AsyncCallbacks.DeleteCallback callback, Object ctx) {
+        if (state == State.Closed) {
 
 Review comment:
   There's no difference with `STATE_UPDATER.get(this)`. Reading a volatile variable gives the last value of 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:
users@infra.apache.org


With regards,
Apache Git Services