-
Type:
Task
-
Resolution: Duplicate
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
v7.0
-
105
-
None
-
3
-
None
-
None
-
None
-
None
-
None
-
None
When calling updateDocument() here:
https://github.com/10gen/mongo/blob/v7.0/src/mongo/db/exec/update_stage.cpp#L269-L281
Note that we compute the diff from the OpLog event, but there are only 2 choices: either the diff from the the oplog, or all indexes have been changed. But there is a third option: No indexes have changed. We need to pass that value through and handle it correctly in updateRecord() to avoid updating more indexes than we should, and to avoid going through the anyIndexesMightBeAffected() checks if it isn't needed.