divijvaidya commented on code in PR #12281:
URL: https://github.com/apache/kafka/pull/12281#discussion_r937504331
##########
streams/src/main/java/org/apache/kafka/streams/state/internals/metrics/RocksDBMetricsRecordingTrigger.java:
##########
@@ -32,12 +32,12 @@ public RocksDBMetricsRecordingTrigger(final Time time) {
public void addMetricsRecorder(final RocksDBMetricsRecorder
metricsRecorder) {
final String metricsRecorderName =
metricsRecorderName(metricsRecorder);
- if (metricsRecordersToTrigger.containsKey(metricsRecorderName)) {
+ final RocksDBMetricsRecorder existingRocksDBMetricsRecorder =
metricsRecordersToTrigger.putIfAbsent(metricsRecorderName, metricsRecorder);
Review Comment:
Thanks for your code review folks. On deeper analysis, it doesn't look like
that this code will be invoked by multiple threads. I will discard this PR now
and I thank you again for looking into this PR.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]