Skip to content

Commit

Permalink
[fix] set useTxn when use transaction
Browse files Browse the repository at this point in the history
  • Loading branch information
gunli committed Jun 30, 2023
1 parent 8d34019 commit c40581d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pulsar/producer_partition.go
Original file line number Diff line number Diff line change
Expand Up @@ -707,6 +707,7 @@ func addRequestToBatch(smm *pb.SingleMessageMetadata, p *partitionProducer,
var leastSigBits uint64
if request.transaction != nil {
txnID := request.transaction.GetTxnID()
useTxn = true
mostSigBits = txnID.MostSigBits
leastSigBits = txnID.LeastSigBits
}
Expand Down Expand Up @@ -813,6 +814,7 @@ func (p *partitionProducer) internalSingleSend(mm *pb.MessageMetadata,

if request.transaction != nil {
txnID := request.transaction.GetTxnID()
useTxn = true
mostSigBits = txnID.MostSigBits
leastSigBits = txnID.LeastSigBits
}
Expand Down

0 comments on commit c40581d

Please sign in to comment.