chia7712 commented on pull request #8657: URL: https://github.com/apache/kafka/pull/8657#issuecomment-688481474
@junrao Thanks for all reviews again 👍 > Do you plan to remove some of the unused methods in DelayedOperations in Partition? my bad. I forgot this request :( Expect for ```checkAndCompleteFetch```, the other unused methods (in production scope) are removed by this PR. > Currently, when calling checkAndComplete() for the produce/fetch/deleteRecords purgatory, we still hold replicaStateChangeLock. This doesn't seem to cause any deadlock for now. In the future, we can potentially improve this by calling checkAndComplete() outside of the replicaStateChangeLock by passing leader epoch into those delayed operations and checking if leader epoch has changed in tryComplete(). It seems we can remove ```delayedOperations``` from```Partition```. That is similar to this PR and ```Partition``` SHOULD NOT complete delayed request anymore. I can take over this in separate PR :) ---------------------------------------------------------------- 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: us...@infra.apache.org