You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "liangyepianzhou (via GitHub)" <gi...@apache.org> on 2023/07/24 08:34:14 UTC
[GitHub] [pulsar-client-go] liangyepianzhou commented on a diff in pull request #1069: [fix][txn] Fix the transaction acknowledgement and send logic for chunk message
liangyepianzhou commented on code in PR #1069:
URL: https://github.com/apache/pulsar-client-go/pull/1069#discussion_r1271926527
##########
pulsar/producer_partition.go:
##########
@@ -984,7 +984,7 @@ func (p *partitionProducer) failTimeoutMessages() {
sr.callback(nil, sr.msg, errSendTimeout)
})
}
- if sr.transaction != nil {
+ if (sr.totalChunks <= 1 || sr.chunkID == sr.totalChunks-1) && sr.transaction != nil {
sr.transaction.endSendOrAckOp(nil)
Review Comment:
Sorry, I forget to delete it.
The method should be called in the new callback:
```go
newCallback = func(id MessageID, producerMessage *ProducerMessage, err error) {
callback(id, producerMessage, err)
transactionImpl.endSendOrAckOp(err)
}
```
--
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: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org