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

Manage escaping when captured table are determined for snapshot

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Done
    • Icon: Major Major
    • 2.7.0.Alpha1
    • 2.6.0.Alpha2
    • core-library
    • None

      When sending a blocking snapshot signal, the tables to be snapshot are sent as part of the execute-snapshot signal in the data-collections list.

      The actual tables the snapshot will be executed on is determined in RelationalSnapshotChangeEventSource.determineCapturedTables(), where the data-collections list is pattern matched against all tables that exist in the database in order to exclude tables that may not exist from the snapshot. The tables that exist in the database are parsed into a list of TableId objects and pattern matched against the data-collections strings list using the TableId.identifier() method.
       
      Because of this, escaping database, schema or table names in the data-collections list of fully qualified table names will always return an empty list of tables to be snapshot, because they are not parsed in the same way as the allTableIds set. This is not the case for incremental snapshots.
       
      I believe this limitation will also exist when using the snapshot.include.collection.list property.

       

      My suggested fix here is to determine the tables to be snapshotted using both a pattern match (As exists currently) as well as a new comparison with a List<TableId> parsed data-collections list in order to ensure regex values continue to work as well as escaped qualified table names

              rh-ee-mvitale Mario Fiore Vitale
              bmotts Ben Mottershead (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: