cadonna edited a comment on pull request #9177:
URL: https://github.com/apache/kafka/pull/9177#issuecomment-675909416


   If we assume, that the same thread adds and removes the state store level 
metrics (which is currently the case), we just need thread-safe maps 
`storeLevelSensors` and `storeLevelMetrics` and forgo `synchronize`. This can 
be done by using `ConcurrentMap` instead of `Map`. However, with the current 
API, we do not make that assumption, because we pass in the thread ID. I would 
be really happy to get rid of `synchronized` and make the changes to the API 
for state store level metrics. Afterwards, we should consider adapting also the 
other levels. WDYT?      


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to