[ 
https://issues.apache.org/jira/browse/CASSSIDECAR-349?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18023583#comment-18023583
 ] 

Yifan Cai commented on CASSSIDECAR-349:
---------------------------------------

+1

> 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
>          Components: Observability
>            Reporter: Francisco Guerrero
>            Assignee: Francisco Guerrero
>            Priority: Major
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> 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]

Reply via email to