open-vault/command/agent/cache
Calvin Leung Huang 0df09e356d
agent: add an inflight cache better concurrent request handling (#10705)
* agent: do not grap idLock writelock until caching entry

* agent: inflight cache using sync.Map

* agent: implement an inflight caching mechanism

* agent/lease: add lock for inflight cache to prevent simultaneous Set calls

* agent/lease: lock on a per-ID basis so unique requests can be processed independently

* agent/lease: add some concurrency tests

* test: use lease_id for uniqueness

* agent: remove env flags, add comments around locks

* agent: clean up test comment

* agent: clean up test comment

* agent: remove commented debug code

* agent/lease: word-smithing

* Update command/agent/cache/lease_cache.go

Co-authored-by: Nick Cabatoff <ncabatoff@hashicorp.com>

* agent/lease: return the context error if the Done ch got closed

* agent/lease: fix data race in concurrency tests

* agent/lease: mockDelayProxier: return ctx.Err() if context got canceled

* agent/lease: remove unused inflightCacheLock

* agent/lease: test: bump context timeout to 3s

Co-authored-by: Nick Cabatoff <ncabatoff@hashicorp.com>
2021-01-26 12:09:37 -08:00
..
cachememdb
api_proxy.go Fix Agent handling of gzipped responses (#7470) 2019-09-18 14:24:41 -07:00
api_proxy_test.go
cache_test.go Added flag to disable X-Vault-Token header proxy if client passes the token (#8101) 2020-01-30 09:08:42 -06:00
handler.go http: ensure return after writing response by respondError (#8796) 2020-04-21 15:30:36 -07:00
lease_cache.go agent: add an inflight cache better concurrent request handling (#10705) 2021-01-26 12:09:37 -08:00
lease_cache_test.go agent: add an inflight cache better concurrent request handling (#10705) 2021-01-26 12:09:37 -08:00
listener.go Revert "Migrate internalshared out (#9727)" (#10141) 2020-10-13 16:38:21 -07:00
proxy.go
testing.go agent: add an inflight cache better concurrent request handling (#10705) 2021-01-26 12:09:37 -08:00