chia7712 commented on code in PR #19862:
URL: https://github.com/apache/kafka/pull/19862#discussion_r2137310839


##########
server-common/src/main/java/org/apache/kafka/server/purgatory/DelayedOperation.java:
##########
@@ -58,26 +58,15 @@ public DelayedOperation(long delayMs) {
      * true, others will still return false.
      */
     public boolean forceComplete() {
-        // Do not proceed if the operation is already completed.
-        if (completed) {
+        if (!completed) {
+            completed = true;
+            // cancel the timeout timer
+            cancel();
+            onComplete();
+            return true;

Review Comment:
   > If there is no benefit from removing the return type of forceComplete(), 
we could probably just dismiss this PR.
   
   yes, it seems we can't remove the lock and returned type. +1 to close 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.

To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to