-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Fully Compatible
-
ALL
-
Repl 2021-11-01
-
151
If we do a replSetGetStatus with getLastStableRecoveryTimestamp, we can access storage with no lock; this races with shutdown. File Copy Based Initial Sync makes this much more likely to happen (by shutting down storage in times other than shutdown)
We should fix by doing what we do in curop
http://morningstar/mongodb/source/src/mongo/db/curop.cpp#460
Try to take a global lock with a very short timeout; if we don't get it, just return that we have no stable recovery timestamp.
We might also consider dasserts or invariants in the storage interface for this and similar cases; however, some of the routines take ServiceContext and not OperationContext and so don't have access to the locker.
- causes
-
SERVER-83955 Fix wrong warning messages in ReplSetGetStatus command
- Closed