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

DB2 Db2OnlineDefaultValueIT.shouldHandleDateTimeDefaultTypes fails randomly

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • 2.6-backlog
    • 2.2.0.Alpha1
    • db2-connector
    • None
    • False
    • None
    • False

      Fails with

      Error:    Db2ConnectorIT.restartInTheMiddleOfTxAfterSnapshot:684->restartInTheMiddleOfTx:607->assertRecord:895->lambda$assertRecord$3:895 [COLB not found in schema Schema{testdb.DB2INST1.TABLEA.Value:STRUCT}] 
      Expecting actual not to be null
      Error:    Db2OnlineDefaultValueIT>AbstractDb2DefaultValueIT.shouldHandleDateTimeDefaultTypes:200->AbstractDb2DefaultValueIT.shouldHandleDefaultValuesCommon:214->AbstractDb2DefaultValueIT.testDefaultValuesAlterTableAdd:490->AbstractDb2DefaultValueIT.assertSchemaFieldWithDefaultCurrentDate:541->AbstractDb2DefaultValueIT.assertSchemaFieldValueWithDefault:537->AbstractDb2DefaultValueIT.lambda$assertSchemaFieldWithDefaultCurrentDate$2:549 [Unexpected field value: AVAL_DATE_SYSDATE_NONNULL] 
      Expecting:
       <-719162>
      to be greater than or equal to:
       <1> 
      

      The reason is that after changing table schema and inserting a value emitted record has for the data column value 0001-01-01 (which is later on translated into -719162) instead of CURRENT DATE. Also all other AVAL_*SYSDATE* columns which should have some value are either null or have zero values.

      This value is received directly from the DB2:

      2023-01-27 00:01:11,217 TRACE  DB2_Server|testdb|streaming  Value from data object: *** 0001-01-01 ***   [io.debezium.connector.db2.Db2ValueConverters]
      2023-01-27 00:01:11,217 TRACE  DB2_Server|testdb|streaming  Callback is: io.debezium.jdbc.JdbcValueConverters$$Lambda$363/0x0000000800e9dde8@7119f438   [io.debezium.connector.db2.Db2ValueConverters]
      2023-01-27 00:01:11,217 TRACE  DB2_Server|testdb|streaming  Value from ResultReceiver: [received = true, object = -719162]   [io.debezium.connector.db2.Db2ValueConverters]
      

              vjuranek@redhat.com Vojtech Juranek
              vjuranek@redhat.com Vojtech Juranek
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: