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

Intermittent test failure: SqlServerChangeTableSetIT#readHistoryAfterRestart()

    XMLWordPrintable

Details

    Description

      See https://github.com/debezium/debezium/pull/2230/checks?check_run_id=2129900892:

      SqlServerChangeTableSetIT.readHistoryAfterRestart:596 expected size:<4> but was:<5>
      

      There is an additional ALTER event, which isn't expected:

      [{
          "source" : {
            "server" : "server1"
          },
          "position" : {
            "commit_lsn" : "00000026:00000428:0003",
            "snapshot" : true,
            "snapshot_completed" : false
          },
          "databaseName" : "testDB",
          "schemaName" : "dbo",
          "tableChanges" : [ {
            "type" : "CREATE",
            "id" : "\"testDB\".\"dbo\".\"tablea\"",
            "table" : {
              "defaultCharsetName" : null,
              "primaryKeyColumnNames" : [ "id" ],
              "columns" : [ {
                "name" : "id",
                "jdbcType" : 4,
                "typeName" : "int",
                "typeExpression" : "int",
                "charsetName" : null,
                "length" : 10,
                "scale" : 0,
                "position" : 1,
                "optional" : false,
                "autoIncremented" : false,
                "generated" : false
              }, {
                "name" : "cola",
                "jdbcType" : 12,
                "typeName" : "varchar",
                "typeExpression" : "varchar",
                "charsetName" : null,
                "length" : 30,
                "position" : 2,
                "optional" : true,
                "autoIncremented" : false,
                "generated" : false
              } ]
            }
          } ]
        }, {
          "source" : {
            "server" : "server1"
          },
          "position" : {
            "commit_lsn" : "00000026:00000428:0003",
            "snapshot" : true,
            "snapshot_completed" : false
          },
          "databaseName" : "testDB",
          "schemaName" : "dbo",
          "tableChanges" : [ {
            "type" : "CREATE",
            "id" : "\"testDB\".\"dbo\".\"tableb\"",
            "table" : {
              "defaultCharsetName" : null,
              "primaryKeyColumnNames" : [ "id" ],
              "columns" : [ {
                "name" : "id",
                "jdbcType" : 4,
                "typeName" : "int",
                "typeExpression" : "int",
                "charsetName" : null,
                "length" : 10,
                "scale" : 0,
                "position" : 1,
                "optional" : false,
                "autoIncremented" : false,
                "generated" : false
              }, {
                "name" : "colb",
                "jdbcType" : 12,
                "typeName" : "varchar",
                "typeExpression" : "varchar",
                "charsetName" : null,
                "length" : 30,
                "position" : 2,
                "optional" : true,
                "autoIncremented" : false,
                "generated" : false
              } ]
            }
          } ]
        }, {
          "source" : {
            "server" : "server1"
          },
          "position" : {
            "commit_lsn" : "00000026:00000428:0003",
            "snapshot" : true,
            "snapshot_completed" : false
          },
          "databaseName" : "testDB",
          "schemaName" : "dbo",
          "tableChanges" : [ {
            "type" : "CREATE",
            "id" : "\"testDB\".\"dbo\".\"tablec\"",
            "table" : {
              "defaultCharsetName" : null,
              "primaryKeyColumnNames" : [ "id" ],
              "columns" : [ {
                "name" : "id",
                "jdbcType" : 4,
                "typeName" : "int",
                "typeExpression" : "int",
                "charsetName" : null,
                "length" : 10,
                "scale" : 0,
                "position" : 1,
                "optional" : false,
                "autoIncremented" : false,
                "generated" : false
              }, {
                "name" : "colc",
                "jdbcType" : 12,
                "typeName" : "varchar",
                "typeExpression" : "varchar",
                "charsetName" : null,
                "length" : 30,
                "position" : 2,
                "optional" : true,
                "autoIncremented" : false,
                "generated" : false
              } ]
            }
          } ]
        }, {
          "source" : {
            "server" : "server1"
          },
          "position" : {
            "transaction_id" : null,
            "event_serial_no" : 1,
            "commit_lsn" : "00000026:00000428:0003",
            "change_lsn" : "NULL"
          },
          "databaseName" : "testDB",
          "schemaName" : "dbo",
          "ddl" : "N/A",
          "tableChanges" : [ {
            "type" : "ALTER",
            "id" : "\"testDB\".\"dbo\".\"tableb\"",
            "table" : {
              "defaultCharsetName" : null,
              "primaryKeyColumnNames" : [ "id" ],
              "columns" : [ {
                "name" : "id",
                "jdbcType" : 4,
                "typeName" : "int",
                "typeExpression" : "int",
                "charsetName" : null,
                "length" : 10,
                "scale" : 0,
                "position" : 1,
                "optional" : false,
                "autoIncremented" : false,
                "generated" : false
              }, {
                "name" : "colb",
                "jdbcType" : 12,
                "typeName" : "varchar",
                "typeExpression" : "varchar",
                "charsetName" : null,
                "length" : 30,
                "position" : 2,
                "optional" : true,
                "autoIncremented" : false,
                "generated" : false
              } ]
            }
          } ]
        }, {
          "source" : {
            "server" : "server1"
          },
          "position" : {
            "transaction_id" : null,
            "event_serial_no" : 1,
            "commit_lsn" : "00000026:00000d20:001c",
            "change_lsn" : "00000026:00000d20:001b"
          },
          "databaseName" : "testDB",
          "schemaName" : "dbo",
          "ddl" : "N/A",
          "tableChanges" : [ {
            "type" : "ALTER",
            "id" : "\"testDB\".\"dbo\".\"tableb\"",
            "table" : {
              "defaultCharsetName" : null,
              "primaryKeyColumnNames" : [ "id" ],
              "columns" : [ {
                "name" : "id",
                "jdbcType" : 4,
                "typeName" : "int",
                "typeExpression" : "int",
                "charsetName" : null,
                "length" : 10,
                "scale" : 0,
                "position" : 1,
                "optional" : false,
                "autoIncremented" : false,
                "generated" : false
              } ]
            }
          } ]
        }]
      

      The fourth element (first ALTER) shouldn't be there, it seems to represent the unchanged table structure.

      Attachments

        Activity

          People

            Unassigned Unassigned
            gmorling@redhat.com Gunnar Morling
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: