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

MongoDB connector stops processing oplog events after encountering "new primary" event

    XMLWordPrintable

Details

    • Hide

      Create 3 node MongoDB replica set. (Tried with 3.6.4)
      Start MongoDbConnector in Confluent for any table.
      Connect to Primary MongoDB node and execute rs.stepDown(120)

      Show
      Create 3 node MongoDB replica set. (Tried with 3.6.4) Start MongoDbConnector in Confluent for any table. Connect to Primary MongoDB node and execute rs.stepDown(120)

    Description

      MongoDB connector stops after encountering "new primary" event in oplog. There are no error messages logged and connector status in confluent is shown as "OK".

      "new primary" events are generated each time Mongo replica set changes primary node. But this bug happens only if primary node is changed gracefully by executing rs.stepDown(120). If primary node is "crashed" connector handles it correctly.

      Oplog tracking resumes after confluent is restarted.

      Bug in code:

      • readOplog notices problem and stops by executing return

      There are several options how this could be solved.
      For e.g. by throwing exception if handleOplogEvent returns false.

      But I'm not 100% sure about intended recovery handling approach here.

      Attachments

        Activity

          People

            Unassigned Unassigned
            eba1_jira Egidijus Bartkus (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: