-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Fully Compatible
-
ALL
-
Execution Team 2021-09-06
-
10
In certain circumstances, storage engine startup can race with clean shutdown, and lead to the following invariant failure:
Invariant failure !listenerNotRegistered
The shutdown task that is called from the signal handler to cleanly shut down the storage engine holds a Global X lock. But the initAndListen thread, which initializes the storage engine, and which registers the TimestampMonitor listener, does not hold this lock.
The shutdown path assumes that the storage engine has been completely initialized, but that is not the case. So the server can crash if it is shut down cleanly before the storage engine finishes starting up.
I'm surprised we don't already hold the Global X lock during storage engine initialization, but perhaps we should. An alternative to taking a global lock would be to keep shutdown expeditious and permit this type of race by relaxing the existing invariant.
- is related to
-
SERVER-38128 Create a periodic task associated with the KV engine to notify listeners of stable/oldest/checkpointed timestamp changes
- Closed
-
SERVER-38962 The second phase of two-phase drop should occur when the drop becomes both checkpointed and older than the oldest timestamp
- Closed
-
SERVER-52562 Turn on Lock-Free reads for standalone mode
- Closed