-
Type:
Improvement
-
Resolution: Fixed
-
Priority:
Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Catalog and Routing
-
Fully Compatible
-
CAR Team 2026-07-20, CAR Team 2026-08-03
-
🟦 Shard Catalog
-
None
-
None
-
None
-
None
-
None
-
None
When the database metadata is updated, the primary node first writes an oplog entry and then calls ShardServerOpObserver::onCreateDatabaseMetadata() to update the in-memory database shard catalog.
While the oplog entry is being written, its opTime is reset to 0 so it can be reused if the write is retried after a write conflict. That same oplog entry is later passed to ShardServerOpObserver::onCreateDatabaseMetadata(). Right now this is safe because we do not read its opTime, but if we ever need to rely on it in the future, it will still be 0 instead of the expected value.