liangyepianzhou commented on a change in pull request #12219:
URL: https://github.com/apache/pulsar/pull/12219#discussion_r728010473
##########
File path:
pulsar-broker/src/main/java/org/apache/pulsar/broker/service/persistent/PersistentTopic.java
##########
@@ -2981,12 +2981,16 @@ public void publishTxnMessage(TxnID txnID, ByteBuf
headersAndPayload, PublishCon
// Message has been successfully persisted
messageDeduplication.recordMessagePersisted(publishContext,
(PositionImpl) position);
- publishContext.completed(null,
((PositionImpl) position).getLedgerId(),
- ((PositionImpl)
position).getEntryId());
+ publishContext.completed(null,
position.getLedgerId(),
+ position.getEntryId());
decrementPendingWriteOpsAndCheck();
})
.exceptionally(throwable -> {
+ throwable = throwable.getCause();
+ if (!(throwable instanceof
ManagedLedgerException)){
+ throwable = new
ManagedLedgerException(throwable);
+ }
Review comment:
The methoda of ddFailed() needs to accept ManagedLedgerException as a
parameter, and transaction will return exceptions that are not
ManagedLedgerException in two places. So unified packaging here
--
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]