This is an automated email from the ASF dual-hosted git repository.
eolivelli pushed a commit to branch branch-4.5
in repository https://gitbox.apache.org/repos/asf/bookkeeper.git
The following commit(s) were added to refs/heads/branch-4.5 by this push:
new c3fe58d ISSUE #683: Correctly update length in LedgerHandleAdv
c3fe58d is described below
commit c3fe58dfbc63a33e20b901b6ab2724e86f864d13
Author: Ivan Kelly <[email protected]>
AuthorDate: Thu Nov 2 12:58:20 2017 +0100
ISSUE #683: Correctly update length in LedgerHandleAdv
Commit 7b1eec introduced a change which removed the length parameter
to doAsyncAddEntry. This resulted in the length of the ledger being
added to itself each time for a LedgerHandleAdv, which ultimately
meant that that length would be 0, as it never had anything non-zero
added to it.
This change corrects this, by adding the length of the data parameter
to the ledger length.
Author: Ivan Kelly <[email protected]>
Reviewers: Enrico Olivelli <[email protected]>
This closes #684 from ivankelly/len-fix, closes #683
---
.../src/main/java/org/apache/bookkeeper/client/LedgerHandleAdv.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
a/bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerHandleAdv.java
b/bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerHandleAdv.java
index 672edd8..76b37ad 100644
---
a/bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerHandleAdv.java
+++
b/bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerHandleAdv.java
@@ -179,7 +179,7 @@ public class LedgerHandleAdv extends LedgerHandle {
wasClosed = true;
currentLength = 0;
} else {
- currentLength = addToLength(length);
+ currentLength = addToLength(data.readableBytes());
pendingAddOps.add(op);
}
}
--
To stop receiving notification emails like this one, please contact
['"[email protected]" <[email protected]>'].