Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: AccelByte/accelbyte-python-sdk
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: AccelByte/accelbyte-python-sdk
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.83.x
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 2 commits
  • 7 files changed
  • 2 contributors

Commits on May 25, 2026

  1. fix(token-validation): coalesce cache misses and serve stale on upstr…

    …eam failure
    
    Fixes intermittent HTTP 401 InsufficientPermissionsError clustering at the
    cache-TTL boundary. RolesCache and NamespaceContextCache wiped their dict
    at TTL; all concurrent requests then missed and each fired its own
    upstream fetch. Failures were silently returned as None and surfaced as
    401s on otherwise-valid tokens.
    
    - Single-flight per key via _InflightFetch (Event + captured error);
      N parallel misses produce 1 upstream fetch.
    - Timer callback changed from clear to refresh: re-fetches each key
      in place; the dict is never wiped. Per-key failure retains the prior
      entry (serve-stale).
    - clear() bumps a generation counter; refresh re-checks before each
      iteration and undoes its own write if clear ran mid-fetch, so
      explicit invalidation is not silently re-populated.
    - Fetcher captures BaseException; waiters re-raise to preserve type.
    - __init__ accepts interval=None to skip the Timer for unit tests.
    
    Approved-by: Fadhilla Eka Hentino
    Approved-by: Rinardi Budiadi Sarean
    Elmer Nocon
    Elmer Nocon committed May 25, 2026
    Configuration menu
    Copy the full SHA
    4bca171 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    8b42321 View commit details
    Browse the repository at this point in the history
Loading