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

Ensure rule matcher is locked before updating #159

Merged
merged 1 commit into from
Apr 3, 2019
Merged

Ensure rule matcher is locked before updating #159

merged 1 commit into from
Apr 3, 2019

Conversation

jtescher
Copy link
Contributor

Proposed changes

Lock CachedMatcher before rules are updated when HTTPMatcher refreshes to avoid concurrent map iteration and map write errors.

Checklist

  • I have read the contributing guidelines
  • I confirm that this pull request does not address a security vulnerability. If this pull request addresses a security
    vulnerability, I confirm that I got green light (please contact hi@ory.sh) from the maintainers to push the changes.
  • I signed the Developer's Certificate of Origin
    by signing my commit(s). You can amend your signature to the most recent commit by using git commit --amend -s. If you
    amend the commit, you might need to force push using git push --force HEAD:<branch>. Please be very careful when using
    force push.
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation within the code base (if appropriate)
  • I have documented my changes in the developer guide (if appropriate)

@aeneasr
Copy link
Member

aeneasr commented Mar 28, 2019

I know why tests fail (issue with go modules) and will try to fix this on master in the next couple of days. Then you can rebase and if everything passes it will be merged :)

@aeneasr
Copy link
Member

aeneasr commented Apr 1, 2019

#160 resolved the build issue, could you rebase please? :)

@jtescher
Copy link
Contributor Author

jtescher commented Apr 1, 2019

Rebased 👍

@aeneasr
Copy link
Member

aeneasr commented Apr 2, 2019

If you run make format the format task will pass too. This line is using spaces instead of tabs which causes the format checker to fail.

Lock CachedMatcher before rules are updated when HTTPMatcher refreshes to avoid concurrent map iteration and map write errors.

Signed-off-by: Julian Tescher <jatescher@gmail.com>
@jtescher
Copy link
Contributor Author

jtescher commented Apr 2, 2019

Ok all checks are now passing

@aeneasr
Copy link
Member

aeneasr commented Apr 3, 2019

Awesome, thank you!

@aeneasr aeneasr merged commit 6fb7151 into ory:master Apr 3, 2019
@jtescher jtescher deleted the patch-1 branch April 15, 2019 17:31
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