apoorvmittal10 commented on code in PR #20286:
URL: https://github.com/apache/kafka/pull/20286#discussion_r2248179412


##########
core/src/main/java/kafka/server/share/SharePartition.java:
##########
@@ -2389,10 +2405,18 @@ private AcquisitionLockTimerTask 
acquisitionLockTimerTask(
     }
 
     private AcquisitionLockTimeoutHandler releaseAcquisitionLockOnTimeout() {
-        return (memberId, firstOffset, lastOffset) -> {
+        return (memberId, firstOffset, lastOffset, timerTask) -> {
             List<PersisterStateBatch> stateBatches;
             lock.writeLock().lock();
             try {
+                // Check if timer task is already cancelled. This can happen 
when concurrent requests
+                // happen to acknoweldge in-flight state and timeout handler 
is waiting for the lock

Review Comment:
   My bad, done.



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to