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

CloudEvent value id field is not unique

    XMLWordPrintable

Details

    • False
    • False
    • Undefined

    Description

      According to documentation `id` is "Unique ID that the connector generates for the change event based on the change event’s content".
      However, for MS SQLServer connector current implementation is not unique, because it consists of `change_lsn` and `commit_lsn` only and doesn't contains `event_serial_no`.
      According to documentation the `event_serial_no` field differentiates events that have the same commit and change LSN.
      Adding `event_serial_no` to CloudEventsMaker.ceId() method will resolve the issue:

      public String ceId()
      { return "name:" + recordParser.getMetadata(AbstractSourceInfo.SERVER_NAME_KEY) + ";change_lsn:" + recordParser.getMetadata(RecordParser.SqlserverRecordParser.CHANGE_LSN_KEY) + ";commit_lsn:" + recordParser.getMetadata(RecordParser.SqlserverRecordParser.COMMIT_LSN_KEY) + ";event_serial_no:" + recordParser.getMetadata(RecordParser.SqlserverRecordParser.EVENT_SERIAL_NO_KEY; }
      

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            vaosinbi Vladimir Osin (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: