-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DBZ-8114 Implementing VariableScaleDecimal and improving tests
(cherry picked from commit 79df57b)
- Loading branch information
Showing
31 changed files
with
3,710 additions
and
378 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,12 @@ | ||
## 1. Fix reload of schema after restart | ||
|
||
## 2. Fix blocking snapshot | ||
|
||
## 3. Successfully determine current maximum LSN | ||
|
||
## 4. Testcases | ||
|
||
Adapt more standard testcases from Debezium parent | ||
## ~~1. Fix reload of schema after restart~~ | ||
## ~~2. Fix blocking snapshot~~ | ||
## ~~3. Successfully determine current maximum LSN~~ | ||
## ~~4. Testcases~~ | ||
~~Adapt more standard testcases from Debezium parent~~ | ||
|
||
## 5. Implements Metrics | ||
|
||
- Reference: https://github.com/debezium/debezium/blob/main/debezium-connector-mysql/src/main/java/io/debezium/connector/mysql/MySqlChangeEventSourceMetricsFactory.java | ||
|
||
## 6. Decimal handling mode | ||
|
||
If we set "decimal.handling.mode=percision", which is the default option, it will cause the following exception: | ||
|
||
```text | ||
[2022-05-15 00:48:42,552] ERROR WorkerSourceTask{id=informix-connector-214414-0} Task threw an uncaught and unrecoverable exception (org.apache.kafka.connect.runtime.WorkerTask:179) | ||
org.apache.kafka.connect.errors.ConnectException: Tolerance exceeded in error handler | ||
at org.apache.kafka.connect.runtime.errors.RetryWithToleranceOperator.execAndHandleError(RetryWithToleranceOperator.java:178) | ||
at org.apache.kafka.connect.runtime.errors.RetryWithToleranceOperator.execute(RetryWithToleranceOperator.java:104) | ||
at org.apache.kafka.connect.runtime.WorkerSourceTask.convertTransformedRecord(WorkerSourceTask.java:290) | ||
at org.apache.kafka.connect.runtime.WorkerSourceTask.sendRecords(WorkerSourceTask.java:316) | ||
at org.apache.kafka.connect.runtime.WorkerSourceTask.execute(WorkerSourceTask.java:240) | ||
at org.apache.kafka.connect.runtime.WorkerTask.doRun(WorkerTask.java:177) | ||
at org.apache.kafka.connect.runtime.WorkerTask.run(WorkerTask.java:227) | ||
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) | ||
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) | ||
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) | ||
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) | ||
at java.base/java.lang.Thread.run(Thread.java:833) | ||
Caused by: org.apache.kafka.connect.errors.DataException: BigDecimal has mismatching scale value for given Decimal schema | ||
at org.apache.kafka.connect.data.Decimal.fromLogical(Decimal.java:68) | ||
at org.apache.kafka.connect.json.JsonConverter$13.toJson(JsonConverter.java:206) | ||
at org.apache.kafka.connect.json.JsonConverter.convertToJson(JsonConverter.java:606) | ||
at org.apache.kafka.connect.json.JsonConverter.convertToJson(JsonConverter.java:693) | ||
at org.apache.kafka.connect.json.JsonConverter.convertToJson(JsonConverter.java:693) | ||
at org.apache.kafka.connect.json.JsonConverter.convertToJsonWithEnvelope(JsonConverter.java:581) | ||
at org.apache.kafka.connect.json.JsonConverter.fromConnectData(JsonConverter.java:335) | ||
at org.apache.kafka.connect.storage.Converter.fromConnectData(Converter.java:62) | ||
at org.apache.kafka.connect.runtime.WorkerSourceTask.lambda$convertTransformedRecord$2(WorkerSourceTask.java:290) | ||
at org.apache.kafka.connect.runtime.errors.RetryWithToleranceOperator.execAndRetry(RetryWithToleranceOperator.java:128) | ||
at org.apache.kafka.connect.runtime.errors.RetryWithToleranceOperator.execAndHandleError(RetryWithToleranceOperator.java:162) | ||
... 11 more | ||
``` | ||
## ~~6. Decimal handling mode~~ | ||
~~If we set "decimal.handling.mode=percision", which is the default option, it will cause the following exception: ...~~ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,11 @@ | ||
FROM icr.io/informix/informix-developer-database:12.10.FC12W1DE | ||
|
||
ADD --chown=informix:informix informix_init.sh /opt/ibm/scripts | ||
ADD --chown=informix:informix testdb.sql /opt/ibm/informix/etc | ||
|
||
RUN sed -Ei 's/^(USEOSTIME)\s+\S/\1 1/' /opt/ibm/informix/etc/onconfig.std | ||
|
||
ENV SIZE small | ||
ENV SIZE medium | ||
ENV LICENSE accept | ||
ENV USEOSTIME 1 | ||
ENV DB_SBSPACE 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
set lock mode to wait; | ||
create database testdb with log; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 4 additions & 6 deletions
10
src/test/docker/informix-cdc-docker/14/informix_post_init.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,9 @@ | ||
#!/bin/bash | ||
|
||
dbaccess < $INFORMIXDIR/etc/syscdcv1.sql | ||
dbaccess sysadmin $BASEDIR/sql/informix_extend_root.sql >>$INIT_LOG 2>&1 | ||
|
||
dbaccess < $INFORMIXDIR/etc/testdb.sql | ||
dbaccess sysadmin $BASEDIR/sql/informix_sbspace.sql >>$INIT_LOG 2>&1 | ||
|
||
# cat /dev/null > $INFORMIX_DATA_DIR/spaces/rootdbs.001 > $INFORMIX_DATA_DIR/spaces/rootdbs.002 | ||
# chmod 660 $INFORMIX_DATA_DIR/spaces/rootdbs.001 $INFORMIX_DATA_DIR/spaces/rootdbs.002 | ||
# onspaces -c -d rootdbs1 -p $INFORMIX_DATA_DIR/spaces/rootdbs.001 -o 0 -s 350000 | ||
# onspaces -c -d rootdbs2 -p $INFORMIX_DATA_DIR/spaces/rootdbs.002 -o 0 -s 350000 | ||
dbaccess sysadmin $INFORMIXDIR/etc/syscdcv1.sql >>$INIT_LOG 2>&1 | ||
|
||
dbaccess sysadmin $INFORMIXDIR/etc/testdb.sql >>$INIT_LOG 2>&1 |
Oops, something went wrong.