willome opened a new issue #4638: CDC/Debezium : Unexpected exception with an 
optional Postgis.Geometry column
URL: https://github.com/apache/pulsar/issues/4638
 
 
   When using Postgres Debezium connector with an **nullable 
"Postgis.Geometry"** column, we receive an **Unexpected exception** on startup 
(during the **RecordsRecordsSnapshotProducer**). Everything is working fine if 
the column is **NOT** nullable.
   
   **To Reproduce**
   Steps to reproduce the behavior:
   1. Create a schema like this
   ```
   CREATE EXTENSION postgis;
   CREATE TABLE t_coordonnees
   (
     id SERIAL NOT NULL PRIMARY KEY,
     wgs84 geometry(Geometry,4326)
   );
   ```
   2. Start ```pulsar standalone```
   3. Add connector :  ```bin/pulsar-admin source localrun  --sourceConfigFile 
debezium-postgres-source-config.yaml```
   
   4. Error
   ```
   io.debezium.connector.postgresql.RecordsSnapshotProducer - unexpected 
exception
   org.apache.kafka.connect.errors.SchemaBuilderException: Invalid 
SchemaBuilder call: optional has already been set.
        at 
org.apache.kafka.connect.data.SchemaBuilder.checkNull(SchemaBuilder.java:406) 
~[connect-api-0.10.2.1.jar:?]
        at 
org.apache.kafka.connect.data.SchemaBuilder.optional(SchemaBuilder.java:98) 
~[connect-api-0.10.2.1.jar:?]
        at 
io.debezium.relational.TableSchemaBuilder.addField(TableSchemaBuilder.java:361) 
~[debezium-core-0.10.0.Beta2.jar:0.10.0.Beta2]
        at 
io.debezium.relational.TableSchemaBuilder.lambda$create$0(TableSchemaBuilder.java:108)
 ~[debezium-core-0.10.0.Beta2.jar:0.10.0.Beta2]
        at java.util.ArrayList.forEach(ArrayList.java:1257) ~[?:1.8.0_191]
        at 
java.util.Collections$UnmodifiableCollection.forEach(Collections.java:1080) 
~[?:1.8.0_191]
        at 
io.debezium.relational.TableSchemaBuilder.create(TableSchemaBuilder.java:99) 
~[debezium-core-0.10.0.Beta2.jar:0.10.0.Beta2]
        at 
io.debezium.relational.RelationalDatabaseSchema.buildAndRegisterSchema(RelationalDatabaseSchema.java:126)
 ~[debezium-core-0.10.0.Beta2.jar:0.10.0.Beta2]
        at 
io.debezium.connector.postgresql.PostgresSchema.refreshSchema(PostgresSchema.java:171)
 ~[debezium-connector-postgres-0.10.0.Beta2.jar:0.10.0.Beta2]
        at 
java.util.concurrent.ConcurrentHashMap$KeySetView.forEach(ConcurrentHashMap.java:4649)
 ~[?:1.8.0_191]
        at 
java.util.Collections$UnmodifiableCollection.forEach(Collections.java:1080) 
~[?:1.8.0_191]
        at 
io.debezium.connector.postgresql.PostgresSchema.refreshSchemas(PostgresSchema.java:162)
 ~[debezium-connector-postgres-0.10.0.Beta2.jar:0.10.0.Beta2]
        at 
io.debezium.connector.postgresql.PostgresSchema.refresh(PostgresSchema.java:95) 
~[debezium-connector-postgres-0.10.0.Beta2.jar:0.10.0.Beta2]
        at 
io.debezium.connector.postgresql.RecordsSnapshotProducer.takeSnapshot(RecordsSnapshotProducer.java:189)
 ~[debezium-connector-postgres-0.10.0.Beta2.jar:0.10.0.Beta2]
        at 
io.debezium.connector.postgresql.RecordsSnapshotProducer.lambda$start$0(RecordsSnapshotProducer.java:87)
 ~[debezium-connector-postgres-0.10.0.Beta2.jar:0.10.0.Beta2]
   ```
   
   **Additional context**
   I was thinking that the problem was coming from Debezium first (see 
https://issues.jboss.org/browse/DBZ-1364), but the problem is probably related 
to the kafka connect-api version used by Pulsar (**connect-api-0.10.2.1**) 
which is quite old. Actually the last version is **2.3.0**. We should probably 
update the version expecting to fix this behaviour.
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to