-
Notifications
You must be signed in to change notification settings - Fork 3
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
fix(uat): ease race between MQTT connect and agent reconnect #399
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MikeDombo
approved these changes
Aug 29, 2023
Unit Tests Coverage Report
Minimum allowed coverage is Generated by 🐒 cobertura-action against ee0f85e |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue #, if available:
Ease the race between MQTT connection and re-connection of agent
Description of changes:
Why is this change necessary:
When MQTT client component is restarted for example during second deployment it obtain new gRPC control port and re-connecting to control. Engine control creates new agent control instance and update internal map of agents. We have race between that process coming from lower layers (gRPC connection) and scenario step creates MQTT connection for that client.
When the step wins the race it try to create MQTT connection on dead agent control.
We can't resolve the race completely without explicit synchronization for example waiting until client reconnects to the control again. But we can reduce probability of fails by move some parts of code.
How was this change tested:
Automatically on github CI and CodeBuild
Any additional information or context required to review the change:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.