-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Sharding
-
Fully Compatible
-
ALL
-
Sharding 2020-10-19, Sharding 2020-11-02
When a PrimaryOnlyService service exists on a replica set secondary, it will be in state kPaused. On a primary, it will be in state kRunning.
If one attempts to retrieve an instance while the service is in kPaused, the returned instance will be a boost::none.
OpObservers are run on both primaries and secondaries. This becomes an issue when attempting to run the ReshardingOpObserver, particularly here..
We should prepend a call to PrimaryOnlyService::isRunning() to verify that the PrimaryOnlyService is running before trying to retrieve the instance. Furthermore, we should check if the boost::optional is initialized and throw a DBException anyway, because attempting to index into an uninitialized boost::optional will create a segfault.
- is depended on by
-
SERVER-51209 Fill in missing gaps in Resharding workflow to complete Milestone 1
- Closed