You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2021/09/16 17:02:17 UTC

[GitHub] [druid] kfaraz commented on a change in pull request #11717: Fix load-drop-load sequence for same segment and historical in http loadqueue peon

kfaraz commented on a change in pull request #11717:
URL: https://github.com/apache/druid/pull/11717#discussion_r710310026



##########
File path: server/src/main/java/org/apache/druid/server/coordination/SegmentLoadDropHandler.java
##########
@@ -560,6 +560,11 @@ public void removeSegment(DataSegment segment, DataSegmentChangeCallback callbac
             },
             this::resolveWaitingFutures
         );
+      } else if (status.get().getState() == Status.STATE.SUCCESS) {

Review comment:
       I feel a better approach could be to augment the possible states to denote that the last success was a Drop success rather than invalidating here. (e.g. Maybe we could add a new state SUCCESS_DROPPED, etc.)
   
   The current approach could cause a problem if we send three subsequent requests to Load a segment.
   - Request 1 would honor the request and mark it as PENDING. The request would then complete and be marked SUCCESS.
   - Request 2 would invalidate the status of the previous one.
   - Request 3 would again try to Load the Segment, even though it's already loaded.
   
   Please correct me if my understanding is not right.




-- 
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: commits-unsubscribe@druid.apache.org

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



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org