vamossagar12 commented on PR #15550:
URL: https://github.com/apache/kafka/pull/15550#issuecomment-2009204011

   > So you mean only if the config(MetricConfig config) works, then we need to 
return the updated config, right?
   
   yes, that's correct. Any other thread should see the updated state of the 
shared variables in the synchronised block only after the lock is released. And 
come to think of it, that is already being achieved without the synchronised 
block in the `config()` method.
   
   The changes you have added, provide the same guarantees as whatever exist 
today but at the expense of adding a lock. IF we want to make the value of the 
`config` object visible immediately to other threads, we could consider making 
it `volatile` but i am not sure if we really need it. 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.

To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org

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

Reply via email to