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

SQL Server Connector cannot be upgraded to 2.0

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • 2.4-backlog
    • 2.0.0.Final
    • sqlserver-connector
    • None
    • False
    • None
    • False
    • Important

    Description

       

      We are running SQL Server Connector 1.9.x in Production.

      That connector cannot be upgraded to 2.0.
       

       Issue affects SQL Server Connector running in single-partition mode (this is important).
       

       The breaking change was introduced by DBZ-4726

      • Before the change the single partition was identified just by server name
        public SqlServerPartition(String serverName, String databaseName, ...) {
            super(databaseName);
            this.serverName = serverName;
        
            this.sourcePartition = Collect.hashMapOf(SERVER_PARTITION_KEY, serverName); 
      • Since 2.0 it is identified by server name and database name
        public SqlServerPartition(String serverName, String databaseName) {
            super(databaseName);
            this.serverName = serverName;
        
            this.sourcePartition = Collect.hashMapOf(SERVER_PARTITION_KEY, serverName, DATABASE_PARTITION_KEY, databaseName);
         

         

       
      As a result the 2.0 connector does not see the offsets committed by 1.9 connector:

      • In 1.9 offsets were created for
        ["my-connector",{"server":"db"}] 
      • In 2.0 the offsets are created for
        ["my-connector",{"server":"db","database":"Db_Production"}] 

         

       

      In consequence the upgraded connector starts as a new and unrelated connector, with initial snapshot et al - and not as a continuation of previous one.

       
      The fix requires code change.

       

      The potential workaround would require forging offsets in Kafka Connect topic (which should rather not be recommended)

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              kgrzechnik Krzysztof Grzechnik
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated: