You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "David Mao (Jira)" <ji...@apache.org> on 2021/07/26 03:43:00 UTC

[jira] [Comment Edited] (KAFKA-13135) Reduce GroupMetadata lock contention for offset commit requests

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

David Mao edited comment on KAFKA-13135 at 7/26/21, 3:42 AM:
-------------------------------------------------------------

Taking a closer look, I think we can also optimize this for the happy path.

appendForGroup passes in the groupLock which gets locked during the entire putCacheCallback when completing the DelayedProduce from appending offset messages.

We already lock the groupLock inside of the callback when reading group state. If we can maintain correctness without passing the groupLock to DelayedProduce, we can achieve finer grained locking, and skip locking the group when sending back the offset response. I need to take a look at storeGroup to see if the groupLock is necessary there.


was (Author: david.mao):
Taking a closer look, I think we can also optimize this for the happy path.

appendForGroup passes in the groupLock which gets locked during the entire putCacheCallback when completing the DelayedProduce from appending offset messages.

We already lock the groupLock inside of the callback when reading group state, so we may be able to avoid passing in the groupLock, and achieve some finer grained locking. I need to take a look at storeGroup to see if the groupLock is necessary there.

> Reduce GroupMetadata lock contention for offset commit requests
> ---------------------------------------------------------------
>
>                 Key: KAFKA-13135
>                 URL: https://issues.apache.org/jira/browse/KAFKA-13135
>             Project: Kafka
>          Issue Type: Improvement
>            Reporter: David Mao
>            Priority: Major
>
> as suggested by [~lbradstreet], we can look for similar optimizations to https://issues.apache.org/jira/browse/KAFKA-13134 in the offset commit path.
> It looks like there are some straightforward optimizations possible for the error path.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)