gunli commented on code in PR #1069:
URL: https://github.com/apache/pulsar-client-go/pull/1069#discussion_r1271627457
##########
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:
I think it should passed `errSendTimeout` to `endSendOrAckOp` to update the
transcaction to `TxnError`
```go
func (txn *transaction) endSendOrAckOp(err error) {
if err != nil {
atomic.StoreInt32((*int32)(&txn.state), int32(TxnError))
}
if atomic.AddInt32(&txn.opsCount, -1) == 0 {
//This means there are not pending send/ack requests
txn.opsFlow <- true
}
}
```
--
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]