zengguan opened a new pull request, #1029:
URL: https://github.com/apache/pulsar-client-go/pull/1029
Fixes #1027
### Motivation
fix send timeout error cause by reconnection failures
### Modifications
After #691 , client avoid blocking the reconnection logic, but it also make
reconnection and internalSend/internalFlush have concurrency issues。when the
client connection is block, it run into `p.grabCnx()` to get new connection and
resend pendingQueue messages. At the same time, the internalSend/internalFlush
keep running by use pendingQueue and send mssage by `p._getConn().WriteData`.
Therefore, it received an ack larger than expected, and trigger the
ConnectionClosed logic, then the client entry `p.reconnectToBroker()` and
repeat the concurrency issues with internalSend/internalFlush, fall into
reconnect-resend-
### Verifying this change
- [x] Make sure that the change passes the CI checks.
### Does this pull request potentially affect one of the following parts:
*If `yes` was chosen, please highlight the changes*
- Dependencies (does it add or upgrade a dependency): (no)
- The public API: (no)
- The schema: (no)
- The default values of configurations: (no)
- The wire protocol: (no)
### Documentation
- Does this pull request introduce a new feature? (no)
- If yes, how is the feature documented? (not applicable / docs / GoDocs /
not documented)
- If a feature is not applicable for documentation, explain why?
- If a feature is not documented yet in this PR, please create a followup
issue for adding the documentation
--
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]