Francisco Guerrero created CASSSIDECAR-349:
----------------------------------------------
Summary: Thread race issue when adding excluded metric in
FilteringMetricRegistry
Key: CASSSIDECAR-349
URL: https://issues.apache.org/jira/browse/CASSSIDECAR-349
Project: Sidecar for Apache Cassandra
Issue Type: Bug
Reporter: Francisco Guerrero
Assignee: Francisco Guerrero
In CASSSIDECAR-347, an issue was introduced where two threads can race. A
modification to the {{excludedMetrics}} in the
{{org.apache.cassandra.sidecar.metrics.FilteringMetricRegistry#addExcludedMetricIfNotExists}}
can race with a call to
{{org.apache.cassandra.sidecar.metrics.FilteringMetricRegistry#getMetrics}}
when the {{allMetrics}} is nulled out in {{addExcludedMetricIfNotExists}} but
the metric is not yet added to the {{excludedMetrics}} map, and the other
thread in {{getMetrics}} is computing a new value of {{allMetrics}} without the
new metric that has not yet been added to {{allMetrics}}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]