kfaraz commented on code in PR #14616:
URL: https://github.com/apache/druid/pull/14616#discussion_r1268421547


##########
server/src/main/java/org/apache/druid/server/coordination/SegmentLoadDropHandler.java:
##########
@@ -789,15 +789,20 @@ private CustomSettableFuture(
 
     public void resolve()
     {
-      synchronized (statusRefs) {
+      synchronized (requestStatusesLock) {
         if (isDone()) {
           return;
         }
 
-        List<DataSegmentChangeRequestAndStatus> result = new 
ArrayList<>(statusRefs.size());
-        statusRefs.forEach(
-            (request, statusRef) -> result.add(new 
DataSegmentChangeRequestAndStatus(request, statusRef.get()))
-        );
+        final List<DataSegmentChangeRequestAndStatus> result = new 
ArrayList<>(statusRefs.size());
+        statusRefs.forEach((request, statusRef) -> {
+          // Remove complete statuses from the cache

Review Comment:
   As long as the coordinator doesn't give up on a request it has sent to the 
historical, we should be good.
   i.e. once the coordinator has asked a historical to LOAD a segment, it 
should not ask the historical to DROP the same segment until the LOAD has 
failed or succeeded.
   
   Otherwise, we might keep the cached value of LOAD success around and send 
serve it to the second load request which comes after the drop.



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