You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2020/08/27 09:18:39 UTC

[GitHub] [kafka] kkonstantine commented on a change in pull request #9211: KAFKA-10426: Deadlock on session key update.

kkonstantine commented on a change in pull request #9211:
URL: https://github.com/apache/kafka/pull/9211#discussion_r478275661



##########
File path: connect/runtime/src/main/java/org/apache/kafka/connect/storage/KafkaConfigBackingStore.java
##########
@@ -733,10 +734,11 @@ public void onCompletion(Throwable error, ConsumerRecord<String, byte[]> record)
                         new SecretKeySpec(key, (String) keyAlgorithm),
                         (long) creationTimestamp
                     );
-
-                    if (started)
-                        updateListener.onSessionKeyUpdate(KafkaConfigBackingStore.this.sessionKey);

Review comment:
       `KafkaConfigBackingStore.this.sessionKey` is already a `volatile` member variable. 
   
   So, given that no other common data structures are altered in this block, I'm suspecting that your change means that we might as well get rid off the `synchronized` block altogether in this `else if` branch here. 
   
   I'd like to give it a second thought in the morning but lmk what you think. 




----------------------------------------------------------------
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:
users@infra.apache.org