Details
-
Bug
-
Resolution: Works as Designed
-
Major - P3
-
None
-
3.7.9
-
None
-
Sharding
-
ALL
-
0
Description
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".