-
Notifications
You must be signed in to change notification settings - Fork 77
Fix the seek method could be blocked forever when subscribe RPC is slower than seek RPC #533
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 10 out of 10 changed files in this pull request and generated 8 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
cc @gaoran10 as well since you also have the context |
Fixes #534
Use
mutex_to synchronize the following two composited tasks:setCnx,cnx->registerConsumerandclearReceiveQueuedirectly block inconnectionOpened. Once it's detected the status isCOMPLETED, delay the callback completion after the subscribe response is processed.COMPLETEDwhen the reconnection is not done.Since now many accesses to message id fields are also protected by the
mutex_, removemutexForMessageId_and protect other accesses bymutex_as well.Add more debug logs to
ClientConnectionand support mocking some requests with specific latencies, as well as new teststestSubscribeSeekRacesandtestReconnectionSlowto cover all possible cases.