xiangqiao123 opened a new issue #10118:
URL: https://github.com/apache/druid/issues/10118


   ### Affected Version
   
   0.18.1
   
   ### Description
   Suppose that an interval has more than one segment, if some segments are 
deleted, then refreshing the remaining segments by refreshing segments will be 
skipped and re added to the segmentsNeedingRefresh. As a result, these 
remaining segments can no longer be refreshed successfully(PartitionHolders  
are not complete). This can easily happen when the broker is restarted. We can 
see the following logs:
   `Refreshed metadata for dataSource[test_datasource] in 156 ms (97 segments 
queried, 206 segments left).`
   
   Suppose the code is executed as follows
   1.removeSegment:segmentsNeedingRefresh.remove(segment)  (delete partial 
segment for a interval)
   2.segmentsToRefresh.addAll(segmentsNeedingRefresh); (add remaining segment 
to refresh)
      segmentsNeedingRefresh.clear(); (clear segmentsNeedingRefresh)
   3.final Set<SegmentId> refreshed = refreshSegments(segmentsToRefresh);
   4.segmentsNeedingRefresh.addAll(Sets.difference(segmentsToRefresh, 
refreshed)); (remaining segment  add to segmentsNeedingRefresh again,and can no 
longer refresh successfully)
   
   @clintropolis Can you help me confirm that this is a bug? thank you!
   


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

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



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

Reply via email to