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

DB2 connector get exception possibly caused by setTransactionIsolation(0)

XMLWordPrintable

    • Important

      In order to make your issue reports as actionable as possible, please provide the following information, depending on the issue type.

      Bug report

      For bug reports, provide this information, please:

      What Debezium connector do you use and what version?

      v3.2.0.Final

      What is the connector configuration?

       
      {
        "name": "db2-connector",  
        "config": 

      {     "connector.class": "io.debezium.connector.db2.Db2Connector",      "database.hostname": "db2",      "database.port": "5001",     "database.user": "db2inst1",      "database.password": "123456",      "database.dbname": "testdb",     "topic.prefix": "employee",      "table.include.list": "DB2INST1.EMPLOYEE_SALARY",      "schema.history.internal.kafka.bootstrap.servers": "kafka:9092",      "schema.history.internal.kafka.topic": "schemahistory.employee"    }

      }

      What is the captured database version and mode of deployment?

      (E.g. on-premises, with a specific cloud provider, etc.)

      DB2 v10.5

      What behavior do you expect?

      create connector successfully.

      What behavior do you see?

       there has an exception when I create a new connector on db2: "Invalid parameter: 0 is an invalid transaction isolation level.  See Javadoc specification for a list of valid values. ERRORCODE=-4461, SQLSTATE=42815". I just checked the source code and found the root cause may be in src\main\java\io\debezium\connector\db2\Db2SnapshotChangeEventSource.java method close(SnapshotContext<Db2Partition, Db2OffsetContext> snapshotContext), in this method it will call jdbcConnection.connection().setTransactionIsolation(0), and in db2 the 0 value should be not supported(TRANSACTION_NONE), only Connection.TRANSACTION_READ_UNCOMMITTED, TRANSACTION_READ_COMMITTED, TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLE were supported in db2

      Do you see the same behaviour using the latest released Debezium version?

      (Ideally, also verify with latest Alpha/Beta/CR version)

      yes

      Do you have the connector logs, ideally from start till finish?

      (You might be asked later to provide DEBUG/TRACE level log)

      https://debezium.zulipchat.com/user_uploads/38476/Ggqbm5lPLCmjjxeUPTrbSUpE/PastedText.txt

       

      How to reproduce the issue using our tutorial deployment?

      can setup a db2 database, open the ASN mode and try to create a new connector

      Feature request or enhancement

      For feature requests or enhancements, provide this information, please:

      The Db2SnapshotContext.class was defined with 
      isolationLevelBeforeStart as 0 for default, maybe give another valid value should be better.

      Which use case/requirement will be addressed by the proposed feature?

      <Your answer>

      Implementation ideas (optional)

      <Your answer>

              Unassigned Unassigned
              qb3053136@hotmail.com Bo Qiao
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: