-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
Replication
-
Fully Compatible
-
ALL
-
Repl 2023-03-06
-
6
The config.image_collection holds the last preImage or postImage returned by a findAndModify call, keyed by session id. During initial sync, any preImages or postImages created during oplog application should be invalidated by code in oplog application (oplog.cpp). When the collection has been deleted at the time of application, this invalidation does not happen. There are two places this needs to be fixed.
1) In oplog.cpp, we test for a failure of a collectionUUID to resolve near the top of applyOperation_inlock. If this happens and this operation is a type which returns a preImage or postImage, it should invalidate (and do nothing else).
2) in oplog_applier_utils, in applyOplogEntryOrGroupedInsertsCommon, we obtain a lock on the collection using AutoGetCollection. This will throw a NamespaceNotFound error if the collectionUUID does not resolve. To avoid scattering invalidation code throughout the namespace, we should probably instead ensure this will go ahead and call applyOperation_inlock even if the UUID does not resolve, when we know the data is not consistent. In that case we can take the lock using the namespace in the oplog entry.
- is related to
-
SERVER-76159 Image collection entry is not invalidated when update fails during initial sync
- Open