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

Avoid concurrent read/write of config map in templating #21

Merged
merged 1 commit into from
Jan 2, 2017
Merged

Avoid concurrent read/write of config map in templating #21

merged 1 commit into from
Jan 2, 2017

Conversation

schneidexe
Copy link
Contributor

When the application config update and the health check run in parallel in rare cases there is a concurrent read-write access issue (fatal error: concurrent map read and map write) on the config.Apps used by the golang templating engine.

This PR adds a read-locks on the methods accessing this map (via template engine) to avoid this.

@martensson martensson merged commit aaace74 into martensson:master Jan 2, 2017
@martensson
Copy link
Owner

Great catch, did not run into it myself with countless of tests. Merging it now and will add it to next release!

@schneidexe schneidexe deleted the avoid-map-concurrency-issue branch April 8, 2017 08:54
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.

2 participants