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

TT-555 initializing session with mutex #3309

Merged
merged 3 commits into from Sep 14, 2020

Conversation

tbuchaillot
Copy link
Contributor

Description

Since we're using pointer to mutex in SessionState, when it's initialized we have to initialize the mutex too.

Related Issue

Issue #3307

Motivation and Context

Just to avoid gw from panicking when the session is loaded from redis.

How This Has Been Tested

  1. Start redis docker
  2. Start tyk gw, created an api definition and policy
  3. Generate a key to access that api
  4. Use the key and observe it works fine
  5. Stop and start the tyk-gateway (leave redis running) or use /reload
  6. Use the key to call the api again

Screenshots (if appropriate)

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Refactoring or add test (improvements in base code or adds test coverage to functionality)

Checklist

  • Make sure you are requesting to pull a topic/feature/bugfix branch (right side). If pulling from your own
    fork, don't request your master!
  • Make sure you are making a pull request against the master branch (left side). Also, you should start
    your branch off our latest master.
  • My change requires a change to the documentation.
    • If you've changed APIs, describe what needs to be updated in the documentation.
    • If new config option added, ensure that it can be set via ENV variable
  • I have updated the documentation accordingly.
  • Modules and vendor dependencies have been updated; run go mod tidy && go mod vendor
  • When updating library version must provide reason/explanation for this update.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • Check your code additions will not fail linting checks:
    • go fmt -s
    • go vet

@matiasinsaurralde matiasinsaurralde merged commit 2051a30 into release-2.9 Sep 14, 2020
@matiasinsaurralde matiasinsaurralde deleted the fix-mutex-2.9.4.4 branch September 14, 2020 16:08
@gregdelhon gregdelhon changed the title initializing session with mutex TT-555 initializing session with mutex Sep 15, 2020
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.

None yet

2 participants