[
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:48 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 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.
https://issues.apache.org/jira/browse/KAFKA-6042 may be relevant before
changing any of the locking semantics here.
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.
If we can maintain correctness without passing the groupLock to DelayedProduce,
we can 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.
> 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)