Re: [PR] KAFKA-16381: add lock for KafkaMetric config getter [kafka]

2024-03-22 Thread via GitHub
chia7712 commented on PR #15550: URL: https://github.com/apache/kafka/pull/15550#issuecomment-2016328832 ``` ./gradlew cleanTest :trogdor:test --tests CoordinatorTest.testTaskRequestWithOldStartMsGetsUpdated :connect:mirror:test --tests MirrorConnectorsWithCustomForwardingAdminIntegrati

Re: [PR] KAFKA-16381: add lock for KafkaMetric config getter [kafka]

2024-03-22 Thread via GitHub
johnnychhsu commented on PR #15550: URL: https://github.com/apache/kafka/pull/15550#issuecomment-2015136213 @vamossagar12 thanks for the reminder. Updated the PR description to reflect the latest changes. -- This is an automated message from the Apache Git Service. To respond to the me

Re: [PR] KAFKA-16381: add lock for KafkaMetric config getter [kafka]

2024-03-22 Thread via GitHub
vamossagar12 commented on PR #15550: URL: https://github.com/apache/kafka/pull/15550#issuecomment-2014566088 @johnnychhsu , you could probably update the PR description to reflect the latest changes. -- This is an automated message from the Apache Git Service. To respond to the message, p

Re: [PR] KAFKA-16381: add lock for KafkaMetric config getter [kafka]

2024-03-21 Thread via GitHub
johnnychhsu commented on PR #15550: URL: https://github.com/apache/kafka/pull/15550#issuecomment-2012073628 thanks @vamossagar12 @ijuma for the comments. That's a fair point, I agree that a lock is heavy, and `volatile` should be good enough for this. Let me change this, thanks! -- Thi

Re: [PR] KAFKA-16381: add lock for KafkaMetric config getter [kafka]

2024-03-21 Thread via GitHub
ijuma commented on PR #15550: URL: https://github.com/apache/kafka/pull/15550#issuecomment-2011383134 I agree that the current behavior doesn't look right, but adding a lock is also too heavyweight. `volatile` seems reasonable. -- This is an automated message from the Apache Git Service.

Re: [PR] KAFKA-16381: add lock for KafkaMetric config getter [kafka]

2024-03-20 Thread via GitHub
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 stat

Re: [PR] KAFKA-16381: add lock for KafkaMetric config getter [kafka]

2024-03-19 Thread via GitHub
johnnychhsu commented on PR #15550: URL: https://github.com/apache/kafka/pull/15550#issuecomment-2007003985 Thanks for the review @vamossagar12 . let me rephrase your comment to make sure that I understand you correctly. > Now, if some other thread is trying to update the config by usin

[PR] KAFKA-16381: add lock for KafkaMetric config getter [kafka]

2024-03-17 Thread via GitHub
johnnychhsu opened a new pull request, #15550: URL: https://github.com/apache/kafka/pull/15550 ## Context In KafkaMetirc.java, the config getter isĀ  ``` @Override public MetricName metricName() { return this.metricName; } ``` and there is a setterĀ  ``` p