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

Caching: Fix race #1259

Merged
merged 1 commit into from
Aug 17, 2021
Merged

Caching: Fix race #1259

merged 1 commit into from
Aug 17, 2021

Commits on Aug 17, 2021

  1. Caching: Fix race

    When caching is disabled with none, the cache key can be in there, and a
    race condition can be happend with this.
    
    To test this:
    
    1) Strict caching mode
    2) Made a request, 200 OK cache.set("$KEY", 200)
    3) Update config to none
    4) apicast/proxy:authorize -> cache.get($KEY) is 200
    5) request go to the API
    6) Authrep, cache for $KEY is deleted.
    
    Next request will return 403.
    
    Fixed behaviour:
    
    1) Strict caching mode
    2) Made a request, 200 OK cache.set("$KEY", 200)
    3) Update config to none
    4) apicast/proxy:authorize -> cache.get($KEY) is 200
    5) cache_is_disabled = true -> execute backend call.
    5) request go to the API, and fails
    6) Authrep, cache for $KEY is deleted.
    
    Fix THREESCALE-4464
    
    Signed-off-by: Eloy Coto <eloy.coto@acalustra.com>
    eloycoto committed Aug 17, 2021
    Configuration menu
    Copy the full SHA
    85c0f78 View commit details
    Browse the repository at this point in the history