suraj-goel commented on code in PR #17723:
URL: https://github.com/apache/druid/pull/17723#discussion_r1957142390


##########
indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/SeekableStreamIndexTaskRunner.java:
##########
@@ -1887,10 +1887,12 @@ public Response pauseHTTP(
   @VisibleForTesting
   public Response pause() throws InterruptedException
   {
-    if (!(status == Status.PAUSED || status == Status.READING)) {
+    Status currentStatus = status;
+    if (!(currentStatus == Status.PAUSED || currentStatus == Status.READING)) {

Review Comment:
   @kfaraz,
   
   > Would it be possible for you to test out this change on the cluster where 
you saw the task pause failures?
   
   There has been no failures in the cluster since this patch is deployed. It's 
been 3 days since the deployment.
   
   > We should just put this entire if block inside the statusLock. What do you 
think?
   
   This won't help. As mentioned before, `possiblyPause`  method will still be 
able to change the status as it doesn't have any usage of `statusLock`.
   We can use the `pauseLock` in `pause` method (previous commit) or add a 
`statusLock` in `possiblyPause` method.
   
   
   Right now, I think the current commit seems to be the safest way to resolve 
this bug.
   



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to