Delay cache invalidation during container creation
Having the cache being cleared before the PUT request creates a fairly big window where the cache can be inconsistent, if a concurrent GET happens. Let's move the cache clear after the requests to reduce it. Change-Id: I45130cc32ba3a23272c2a67c86b4063000379426 Closes-Bug: #1715177
This commit is contained in:
@@ -177,11 +177,11 @@ class ContainerController(Controller):
|
||||
headers = self._backend_requests(req, len(containers),
|
||||
account_partition, accounts,
|
||||
policy_index)
|
||||
clear_info_cache(self.app, req.environ,
|
||||
self.account_name, self.container_name)
|
||||
resp = self.make_requests(
|
||||
req, self.app.container_ring,
|
||||
container_partition, 'PUT', req.swift_entity_path, headers)
|
||||
clear_info_cache(self.app, req.environ,
|
||||
self.account_name, self.container_name)
|
||||
return resp
|
||||
|
||||
@public
|
||||
|
||||
Reference in New Issue
Block a user