-
Type: Bug
-
Resolution: Works as Designed
-
Priority: Major - P3
-
None
-
Affects Version/s: 3.7.9
-
Component/s: Sharding
-
Labels:None
-
Sharding
-
ALL
-
0
Note that the condition here:
https://github.com/mongodb/mongo/blob/r3.7.9/src/mongo/db/s/migration_source_manager.cpp#L483
Checks for the shutdown status and calls inShutdown(). Because inShutdown is using memory_order_relaxed, it is totally legal for another thread to be in "shutdown" state and return a shutdown error, while the migration thread still sees that it is not yet in "shutdown".