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

Replace simple string for range tombstones for JSON object

      A user reported that when he has this table

      CREATE TABLE ks.tb (
          s text,
          sp int,
          d text,
          dp int,
          t timestamp,
          m map<text, text>,
          PRIMARY KEY (s, sp, d, dp)
      ) WITH CLUSTERING ORDER BY (sp ASC, d ASC, dp ASC)
      

      and he does this CQL:

      DELETE FROM ks.tb WHERE s = '1,33619828888' and sp = 1 and d = '12, 23, toto' and dp > 1;
      

      It will result in this record:

      "after": {
          "s": {
          "value": "1,33619828888",
          "deletion_ts": null,
          "set": true
          },
          "sp": null,
          "d": null,
          "dp": null,
          "m": null,
          "t": null,
          "_range_start": "EXCL_START_BOUND(1, 12, 23, toto, 1)",
          "_range_end": "INCL_END_BOUND(1, 12, 23, toto)"
      }
      

      This is quite unfortunate to parse on consumer level because consumer does not know what to actually parse as values because there are commas in value and commas are separating the values themselves.

      The solution is to do this:

      "after": {
          "s": {
              "value": "1,33619828888",
              "deletion_ts": null,
              "set": true
          },
          "sp": null,
          "d": null,
          "dp": null,
          "m": null,
          "t": null,
          "_range_start": {
              "method": "EXCL_START_BOUND",
              "values": {
                  "sp": "1",
                  "d": "12, 23, toto",
                  "dp": "1"
              }
          },
         "_range_end": {
              "method": "INCL_END_BOUND",
              "values": {
                  "sp": "1",
                  "d": "12, 23, toto"
              }
          }
      }
      

            [DBZ-5912] Replace simple string for range tombstones for JSON object

            Errata Tool added a comment -

            Since the problem described in this issue should be resolved in a recent advisory, it has been closed.

            For information on the advisory (Red Hat build of Debezium 2.1.4 release), and where to find the updated files, follow the link below.

            If the solution does not work for you, open a new bug report.
            https://access.redhat.com/errata/RHEA-2023:1814

            Errata Tool added a comment - Since the problem described in this issue should be resolved in a recent advisory, it has been closed. For information on the advisory (Red Hat build of Debezium 2.1.4 release), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHEA-2023:1814

            Released

            Debezium Builder added a comment - Released

            It would be nice to have this in before 2.1.0.Final is out.

            Stefan Miklosovic (Inactive) added a comment - - edited It would be nice to have this in before 2.1.0.Final is out.

              Unassigned Unassigned
              smiklosovic Stefan Miklosovic (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: