You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by mm...@apache.org on 2018/03/26 22:24:14 UTC

[incubator-pulsar] branch master updated: Avoid allocation of one PositionImpl object in write path (#1439)

This is an automated email from the ASF dual-hosted git repository.

mmerli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-pulsar.git


The following commit(s) were added to refs/heads/master by this push:
     new 01a77aa  Avoid allocation of one PositionImpl object in write path (#1439)
01a77aa is described below

commit 01a77aa29d7c1a8376227211403bfec26b57abc7
Author: Matteo Merli <mm...@apache.org>
AuthorDate: Mon Mar 26 15:24:12 2018 -0700

    Avoid allocation of one PositionImpl object in write path (#1439)
---
 .../src/main/java/org/apache/bookkeeper/mledger/impl/OpAddEntry.java    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/OpAddEntry.java b/managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/OpAddEntry.java
index b1f1d56..85c4da6 100644
--- a/managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/OpAddEntry.java
+++ b/managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/OpAddEntry.java
@@ -166,7 +166,7 @@ class OpAddEntry extends SafeRunnable implements AddCallback, CloseCallback {
             updateLatency();
             AddEntryCallback cb = callbackUpdater.getAndSet(this, null);
             if (cb != null) {
-                cb.addComplete(PositionImpl.get(ledger.getId(), entryId), ctx);
+                cb.addComplete(lastEntry, ctx);
                 ml.notifyCursors();
                 this.recycle();
             }

-- 
To stop receiving notification emails like this one, please contact
mmerli@apache.org.