poorbarcode commented on code in PR #16758:
URL: https://github.com/apache/pulsar/pull/16758#discussion_r940618722
##########
pulsar-transaction/coordinator/src/main/java/org/apache/pulsar/transaction/coordinator/impl/TxnLogBufferedWriter.java:
##########
@@ -198,33 +209,99 @@ public void asyncAddData(T data, AddDataCallback
callback, Object ctx){
AsyncAddArgs.newInstance(callback, ctx,
System.currentTimeMillis(), byteBuf));
return;
}
- singleThreadExecutorForWrite.execute(() -> internalAsyncAddData(data,
callback, ctx));
+ singleThreadExecutorForWrite.execute(() -> {
+ try {
+ internalAsyncAddData(data, callback, ctx);
+ } catch (Exception e){
+ log.error("Internal async add data fail", e);
Review Comment:
> But it will break the order, no? If you have 3 records need to write to
the managed ledger, A, B, and C. If A fails here, B and C will continue to
write. As you said the request hold in the memory queue, the next round A will
be retry.
If A already append to the array, it should be ok.
I added a logic that fails callback if the append to the queue fails
--
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]