[ 
https://issues.apache.org/jira/browse/KAFKA-21184?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18121215#comment-18121215
 ] 

Aditya Kousik commented on KAFKA-21184:
---------------------------------------

[~chia7712], could KAFKA-20833 help here? I realised implementing it the way 
it’s written, it doesn’t need any votes because no public APIs are changed 
because it will be all `CLASS` retained annotations. These can be caught at PR 
time with a static analysis checker.

> Fix the race condition in share session
> ---------------------------------------
>
>                 Key: KAFKA-21184
>                 URL: https://issues.apache.org/jira/browse/KAFKA-21184
>             Project: Kafka
>          Issue Type: Bug
>            Reporter: Chia-Ping Tsai
>            Assignee: Apoorv Mittal
>            Priority: Major
>
> {{maybeRemoveAndNotifyListenersOnMemberLeave}} reads the session under the 
> lock, but {{onMemberLeave}} runs outside it. If another thread replaces the 
> session in between, {{onMemberLeave}} -> {{releaseSession}} -> 
> {{cache.remove(key)}} still removes by key, so it removes the new session 
> instead of the old one.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to