mirror of https://github.com/hashicorp/consul
c81dc8c551
The consul-k8s endpoints controller issues catalog register and manual virtual ip updates without first checking to see if the updates would be effectively not changing anything. This is supposed to be reasonable because the state store functions do the check for a no-op update and should discard repeat updates so that downstream blocking queries watching one of the resources don't fire pointlessly (and CPU wastefully). While this is true for the check/service/node catalog updates, it is not true for the "manual virtual ip" updates triggered by the PUT /v1/internal/service-virtual-ip. Forcing the connect injector pod to recycle while watching some lightly modified FSM code can show that a lot of updates are of the update list of ips from [A] to [A]. Immediately following this stray update you can see a lot of activity in proxycfg and xds packages waking up due to blocking queries triggered by this. This PR skips updates that change nothing both: - at the RPC layer before passing it to raft (ideally) - if the write does make it through raft and get applied to the FSM (failsafe) |
||
---|---|---|
.. | ||
channels | ||
decode | ||
file | ||
hoststats | ||
maps | ||
mutex | ||
retry | ||
routine | ||
semaphore | ||
stringslice | ||
template | ||
testhelpers | ||
ttlcache | ||
cluster.go | ||
cluster_test.go | ||
eof.go | ||
eof_test.go | ||
json.go | ||
map_walker.go | ||
map_walker_test.go | ||
math.go | ||
math_test.go | ||
path.go | ||
stop_context.go | ||
stop_context_test.go | ||
strings.go | ||
telemetry.go | ||
telemetry_test.go | ||
translate.go | ||
translate_test.go | ||
useragent.go | ||
useragent_test.go | ||
uuid.go |