-
Type: Improvement
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Catalog and Routing
-
3
There's several calls to acquireOplogCollectionForLogging and establishOplogCollectionForLogging in different parts of the code, attempting to fetch the oplog Collection pointer and cache it.
If the Collection object exists and is available, it must have been registered in the collection catalog. There already is onDeregisterFromCatalog call which basically clears the cached oplog pointer. We could do the same for the register path, and register the created instance. Ending up with a single call to establishOplogCollectionForLogging.
The drawback is some tests manually creating the oplog collection have to be fixed. (Mainly due to global write lock requirement / invariant). More generally, we'd have to address a user attempting to create local.oplog.rs (but this probably shouldn't be allowed in the first place).
(Split off from SERVER-80789 to ease backportability)
- is related to
-
SERVER-80789 Make AutoGetOplog behave consistently in replica set node started as standalone
- Closed