-
Type:
Improvement
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Query Execution
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Adding a new node to a replica set and making it primary may cause "ChangeStreamHistoryLost" error when trying to resume from it, because the new node's oplog will neither contain past events nor "initiating set" entry.
This is a known limitation of change streams, but it could be somewhat surprising to the user. We can improve the situation:
Option 1: better error diagnostics pointing at this situation, e.g., "your primary does not have the same history as your secondaries, therefore expect change stream history inconsistencies until oplogs are synchronized again".
Option 2: force replication to synchronize the oplogs and ensure change stream consistency at the price of slower adding the new node.
- related to
-
SERVER-121834 Change stream cursors should respect readPreference after replica set elections
-
- Backlog
-