codelipenghui commented on code in PR #19404:
URL: https://github.com/apache/pulsar/pull/19404#discussion_r1095259408
##########
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/OpAddEntry.java:
##########
@@ -138,6 +138,8 @@ public void initiate() {
duplicateBuffer =
payloadProcessorHandle.getProcessedPayload();
}
}
+ this.dataLength = duplicateBuffer.readableBytes();
+ this.ml.currentLedgerSize += (dataLength - originalDataLen);
Review Comment:
Is it better to just reset the `dataLength` if the payload processor
presents?
```java
if (payloadProcessorHandle != null) {
duplicateBuffer = payloadProcessorHandle.getProcessedPayload();
dataLength = duplicateBuffer.readableBytes();
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]