Controller's cache isn't thread safe
|Reported by:||atagar||Owned by:||atagar|
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.
Change History (14)
comment:9 follow-up: ↓ 10 Changed 4 years ago by atagar
- Status changed from needs_review to needs_revision
comment:13 Changed 4 years ago by atagar
- Resolution set to fixed
- Status changed from needs_review to closed