-
Enhancement
-
Resolution: Unresolved
-
Major
-
2.5.0.Alpha1
-
None
-
False
-
None
-
False
Since https://issues.redhat.com/browse/DBZ-5953 was never actually implemented but still deemed necessary, per discussions with jcechace@redhat.com offline I am reopening under a new ticket since the automation insists it be closed . Please see comments on that Jira for additional context and colour.
Prototype of this functionality may be found here:
https://github.com/debezium/debezium/pull/4315
When change streams are in a getMore loop against an open cursor, they do not respect the read preference defined in the connection if there is a promotion event that invalidates the primary / secondary status of the server it is streaming from. This feature is to leverage SDAM and monitor the server's status, and if the read preference is invalidated, close the cursor noting the resume token, re-open against a read preference compatible node, and resume streaming from the resume token. This feature is key in order to keep load off the primary node.
This is 1 of 2 lingering items remaining from adding support to read from MongoDB secondaries. Specifically, from #4071
What is missing:
- When secondary which is being used to stream changes is promoted to primary the event stream is not recreated
- clones
-
DBZ-5953 Add support for honouring MongoDB read preference in change stream after promotion
- Closed
- is incorporated by
-
DBZ-6032 Refactor connection management for mongodb connector
- Closed
- is related to
-
DBZ-4339 MongoDB connector to use secondary node
- Closed
- links to
-
RHEA-2023:120698 Red Hat build of Debezium 2.3.4 release