Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Trac Trac
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Issues 246
    • Issues 246
    • List
    • Boards
    • Service Desk
    • Milestones
  • Packages and registries
    • Packages and registries
    • Container Registry
    • Model experiments
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
  • Wiki
    • Wiki
  • Activity
  • Create a new issue
  • Issue Boards
Collapse sidebar
  • Legacy
  • TracTrac
  • Issues
  • #8607

Controller's cache isn't thread safe

The Controller's _request_cache attribute isn't used in a thread safe manner. Once upon a time we only added to it so this wasn't an issue, but now that we're doing cache invalidation we need to be more careful. For instance...

# check for cached results
for param in list(lookup_params):
  cache_key = "getconf.%s" % param.lower()

  if cache_key in self._request_cache:
    reply[param] = self._request_cache[cache_key]
    lookup_params.remove(param)

Querying and changing the cache should be under methods that acquire a cache lock.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking