-
Type:
Improvement
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Query Execution
-
QE 2025-10-13
-
None
-
None
-
None
-
None
-
None
-
None
-
None
$v:1 oplog entries are not written since MongoDB v5 and should not be supported by change streams.
Until a recent change in SERVER-111406, the change streams event generation code contained a wrong check for $v fields in oplog entries when doing the event transformation. The version before SERVER-111406 effectively disallowed "replace" oplog entries for documents that contained $v fields. SERVER-111406 fixed that, but it led to "update" oplog entries for $v:1 being allowed again. After SERVER-111406 such unsupported oplog entries would trigger the generation of a change stream "replace" event, which is probably wrong.
Instead, we should revert to the pre-SERVER-111406 for $v:1 oplog entries and disallow them again. As mentioned, such oplog entries are not generated since v5 and should not appear in any relevant oplogs. If they appear anyway, their conversion to a change event can simply be forbidden as before.
So basically we should keep the fix from SERVER-111406 for replace oplog entries, but disallow $v:1 update oplog entries again.
- is related to
-
SERVER-111406 Change Stream breaks on document with top-level $v
-
- Closed
-