Uploaded image for project: 'Debezium'
  1. Debezium
  2. DBZ-5953

Add support for honouring MongoDB read preference in change stream after promotion


    • Icon: Enhancement Enhancement
    • Resolution: Done-Errata
    • Icon: Major Major
    • 2.5.0.Alpha1
    • None
    • mongodb-connector
    • None

      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

            jcechace@redhat.com Jakub Čecháček
            btiernay Bob Tiernay
            0 Vote for this issue
            4 Start watching this issue