chia7712 commented on a change in pull request #8657:
URL: https://github.com/apache/kafka/pull/8657#discussion_r427114083
##########
File path: core/src/main/scala/kafka/cluster/Partition.scala
##########
@@ -970,7 +970,16 @@ class Partition(val topicPartition: TopicPartition,
}
}
- def appendRecordsToLeader(records: MemoryRecords, origin: AppendOrigin,
requiredAcks: Int): LogAppendInfo = {
+ /**
+ * @param completeDelayedRequests It may requires a bunch of group locks
when completing delayed requests so it may
+ * produce deadlock if caller already holds a
group lock. Hence, caller should pass
+ * false to disable completion and then
complete the delayed requests after releasing
+ * held group lock
+ */
+ def appendRecordsToLeader(records: MemoryRecords,
+ origin: AppendOrigin,
+ requiredAcks: Int,
+ completeDelayedRequests: Boolean): LogAppendResult
= {
Review comment:
> Potentially we could make the callback an Option so that we still have
a way to avoid polluting the purgatory.
pardon me. I fail to catch your point.
----------------------------------------------------------------
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:
[email protected]