[SERVER-39464] Concurrent rename and shard collection causes shard collection to fail Created: 08/Feb/19  Updated: 27/Oct/23  Resolved: 27/Apr/21

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Randolph Tan Assignee: Pierlauro Sciarelli
Resolution: Gone away Votes: 0
Labels: sharding-causes-bfs-hard
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Related
related to SERVER-39468 renameCollection can potentially conf... Closed
Operating System: ALL
Participants:
Linked BF Score: 35

 Description   

While calling trying to check if there are any documents here, it can hit the ""Executor error during find command :: caused by :: collection dropped." error and fail the entire command. Drop and shardCollection on the same collection are not supposed to happen at the same time, but it is possible with renameCollection (since rename never takes dist lock) and dropTarget set to true.



 Comments   
Comment by Pierlauro Sciarelli [ 27/Apr/21 ]

With the work completed under SERVER-39468 , both operations are taking the distributed lock in legacy/new paths so will serialize.

Generated at Thu Feb 08 04:52:09 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.