Skip to content
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: do not start multiple blockchain plugin on retry of namespace start #1529

Merged
merged 2 commits into from
Jun 20, 2024

Conversation

EnriqueL8
Copy link
Contributor

@EnriqueL8 EnriqueL8 commented Jun 19, 2024

Fixes #1527

Make sure that in the case where the NS fails to restart because of another plugin has failed do not start the blockchain plugin again when it was successfully started before.

Played around with the idea of using context to clear everything but it didn't make sense. Also I don't think a mutexLock is needed for this.

If you are wondering how all the other plugins work it's because at initialisation part those plugins return a struct that we then use as part of starting the managers/plugins. So we can check for the existence of that struct and not re-initialise that manager/plugin. In the case of the blockchain plugin, it's a shared struct and we just start a new event streams in the init part.

Signed-off-by: Enrique Lacal <enrique.lacal@kaleido.io>
@EnriqueL8 EnriqueL8 requested a review from a team as a code owner June 19, 2024 17:14
Copy link
Contributor

@peterbroadhurst peterbroadhurst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the great explanation 👍

@EnriqueL8 EnriqueL8 merged commit 8fdaeb3 into main Jun 20, 2024
14 checks passed
@EnriqueL8 EnriqueL8 deleted the retry_ns_fix branch June 20, 2024 10:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Start up retry does not clean up previous failed attempts
2 participants