liangyepianzhou commented on code in PR #21406:
URL: https://github.com/apache/pulsar/pull/21406#discussion_r1381923239
##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/transaction/buffer/impl/TopicTransactionBuffer.java:
##########
@@ -231,7 +232,7 @@ public long getCommittedTxnCount() {
@Override
public CompletableFuture<Position> appendBufferToTxn(TxnID txnId, long
sequenceId, ByteBuf buffer) {
buffer.retain();
- return transactionBufferFuture.thenCompose(ignore -> {
+ CompletableFuture<Position> future = publishFuture.thenCompose(ignore
-> {
Review Comment:
Or we can modify the paradigm of `transactionBufferFuture` so that it can
adapt to `sequencer` in this method.
```java
private final CompletableFuture<Position> transactionBufferFuture = new
CompletableFuture<>();
```
But this generic type position is not used. It is also useless and difficult
to understand.
Moreover, it also has the problem of `buffer.retain()`;
--
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]