mirror of https://github.com/hashicorp/consul
Avoid panic on concurrent writes to cached service config map (#10647)
If multiple instances of a service are co-located on the same node then their proxies will all share a cache entry for their resolved service configuration. This is because the cache key contains the name of the watched service but does not take into account the ID of the watching proxies. This means that there will be multiple agent service manager watches that can wake up on the same cache update. These watchers then concurrently modify the value in the cache when merging the resolved config into the local proxy definitions. To avoid this concurrent map write we will only delete the key from opaque config in the local proxy definition after the merge, rather than from the cached value before the merge.pull/10659/head
parent
e2fff3dde9
commit
cf4821885d
@ -0,0 +1,3 @@
|
||||
```release-note:bug
|
||||
connect: fix crash that would result from multiple instances of a service resolving service config on a single agent.
|
||||
```
|
Loading…
Reference in new issue