warren288 opened a new issue #7465: SQLMetadataSegmentManager may trigger a 
thread safe problem when disabling all segments at once
URL: https://github.com/apache/incubator-druid/issues/7465
 
 
   Please provide a detailed title (e.g. "Broker crashes when using TopN query 
with Bound filter" instead of just "Broker crashes").
   
   ### all versions
   
   The Druid version where the problem was encountered.
   
   ### SQLMetadataSegmentManager.poll is executed periodly to synchronize 
segment metadata with metadatabase, and a segment disable request to 
coordinator will trigger SQLMetadataSegmentManager.removeSegment. There is a 
thread safe problem in this scenario. 
   Problem triggering process:
   1. SQLMetadataSegmentManager.poll  polls all segments from druid_segments, 
but not set it into refDataSources yet.
   2. Some one send a disable request of the last used segment to coordinator, 
SQLMetadataSegmentManager.removeSegment updated the database and removed it 
from refDataSources.
   3. SQLMetadataSegmentManager.poll set the segments into refDataSources and 
now refDataSources still contains the segment which had been removed by 
SQLMetadataSegmentManager.removeSegment.
   4. Then SQLMetadataSegmentManager.poll will always got empty segment list 
from database and will not set it into refDataSources.
   5. Therefore, coordinator will never drop the removed segment.
   
   

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

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

Reply via email to