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

Batches with DELETE statement first will skip everything else

XMLWordPrintable

    • False
    • None
    • False

      Let's have this batch statement:

      BEGIN BATCH 
      DELETE FROM ...
      INSERT INTO ...
      INSERT INTO ...
      INSERT INTO ...
      APPLY BATCH ; 

      From commit log handler's point of view, this is one PartitionUpdate (if we are indeed dealing with one partition only).

      The problem is that Debezium processes just DELETE statement and it ignores / skips the rest.

      The reason this is happening is that the current logic asks what "PartitionType" a PartitionUpdate is of, based on the fact there is DELETE, it evaluates it to be "PARTITION_AND_CLUSTERING_KEY_ROW_DELETION" so it will just take that into account and it skips all inserts.

      We should change the logic so we will not skip other statements in a batch.

              Unassigned Unassigned
              smiklosovic Stefan Miklosovic
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: