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

lock TagSettings structure when modified #1796

Merged
merged 2 commits into from
Sep 9, 2018

Conversation

posener
Copy link
Contributor

@posener posener commented Mar 14, 2018

The map is modified in different places in the code which results in race conditions
on execution.
This commit locks the map with read-write lock when it is modified

  • Do only one thing
  • No API-breaking changes
  • New code/logic commented & tested

The map is modified in different places in the code which results in race conditions
on execution.
This commit locks the map with read-write lock when it is modified
@jinzhu jinzhu added this to the v2.0 milestone Mar 15, 2018
@posener
Copy link
Contributor Author

posener commented Apr 9, 2018

@jinzhu why is this in v2.0 milestone? I can't see any API break here.
Can this be merged to master?
Thanks!

Copy link
Contributor

@mtfelian mtfelian left a comment

Choose a reason for hiding this comment

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

OK, but personally I prefer GetTagSettings()

@jinzhu jinzhu merged commit 123d4f5 into go-gorm:master Sep 9, 2018
xuyang2 pushed a commit to easyops-cn/gorm that referenced this pull request Dec 11, 2018
The map is modified in different places in the code which results in race conditions
on execution.
This commit locks the map with read-write lock when it is modified
blefevre pushed a commit to blefevre/gorm that referenced this pull request Feb 17, 2020
The map is modified in different places in the code which results in race conditions
on execution.
This commit locks the map with read-write lock when it is modified
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.

3 participants