streamnative / pulsar-client-go

Apache Pulsar Go Client Library
https://pulsar.apache.org/
Apache License 2.0
1 stars 2 forks source link

Received ack for ledgerId:304866784 entryId:71847  on sequenceId 2216277 - expected: 2217115, closing connection #271

Open Aries-hash opened 1 year ago

Aries-hash commented 1 year ago

error log : warning msg="Received ack for ledgerId:304866784 entryId:71847  on sequenceId 2216277 - expected: 2217115, closing connection" producerID=7 producer_na  me=xxx topic="persistent://xxxxxxxx/million_group_push/million_group_push-partition-5" 

client version:pulsar-client-go 0.9 broker versiom: 2.9

code: https://github.com/streamnative/pulsar-client-go/blob/7f91b2bcd798e1dc6ff27b10a557c8ee5440a83a/pulsar/producer_partition.go#L1184

It's currently suspected that the else if branch didn't close the connection, triggering this issue. Please assist with optimizing it.

Aries-hash commented 1 year ago

I also reviewed the logic of the sequenceId. The second branch is fine, so it was ignored in the code. The first branch is unacceptable.