Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

long(1565999999000) should be between 0 and 4294967295 inclusive of both values #277

Closed
melnikov-tm opened this issue Jul 20, 2023 · 4 comments

Comments

@melnikov-tm
Copy link

looks like a similar issue to #272

Syncing MySQL 8.0.32 to Clickhouse 23.4.2.11 using registry.gitlab.com/altinity-public/container-images/clickhouse_debezium_embedded:latest

docker-debezium-embedded-1  | 19601 2023-07-20 05:48:55.399 [pool-21-thread-4] ERROR com.altinity.clickhouse.sink.connector.db.DbWriter  - ******* ERROR inserting Batch *****************
docker-debezium-embedded-1  | java.lang.IllegalArgumentException: long(1565999999000) should be between 0 and 4294967295 inclusive of both values
docker-debezium-embedded-1  | 	at com.clickhouse.data.ClickHouseChecker.newException(ClickHouseChecker.java:17)
docker-debezium-embedded-1  | 	at com.clickhouse.data.ClickHouseChecker.between(ClickHouseChecker.java:109)
docker-debezium-embedded-1  | 	at com.clickhouse.data.format.BinaryStreamUtils.writeUnsignedInt32(BinaryStreamUtils.java:806)
docker-debezium-embedded-1  | 	at com.clickhouse.data.format.BinaryDataProcessor$DateTime32SerDe.serialize(BinaryDataProcessor.java:239)
docker-debezium-embedded-1  | 	at com.clickhouse.data.ClickHouseDataProcessor.write(ClickHouseDataProcessor.java:534)
docker-debezium-embedded-1  | 	at com.clickhouse.jdbc.internal.InputBasedPreparedStatement.addBatch(InputBasedPreparedStatement.java:345)
docker-debezium-embedded-1  | 	at com.altinity.clickhouse.sink.connector.db.DbWriter.addToPreparedStatementBatch(DbWriter.java:475)
docker-debezium-embedded-1  | 	at com.altinity.clickhouse.sink.connector.executor.ClickHouseBatchRunnable.flushRecordsToClickHouse(ClickHouseBatchRunnable.java:198)
docker-debezium-embedded-1  | 	at com.altinity.clickhouse.sink.connector.executor.ClickHouseBatchRunnable.processRecordsByTopic(ClickHouseBatchRunnable.java:169)
docker-debezium-embedded-1  | 	at com.altinity.clickhouse.sink.connector.executor.ClickHouseBatchRunnable.run(ClickHouseBatchRunnable.java:101)
docker-debezium-embedded-1  | 	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
docker-debezium-embedded-1  | 	at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305)
docker-debezium-embedded-1  | 	at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305)
docker-debezium-embedded-1  | 	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
docker-debezium-embedded-1  | 	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
docker-debezium-embedded-1  | 	at java.base/java.lang.Thread.run(Thread.java:829)

Any settings or changes in a table that can help to resolve this?
Thanks.

@subkanthi
Copy link
Collaborator

Hi @melnikov-tm , can u please Share the schema or datatype in mysql

@melnikov-tm
Copy link
Author

@subkanthi sure here is table ddl

create table DAILY
(
LOGIN int not null,
TIME datetime not null,
GROUP char(16) not null,
BANK char(64) not null,
BALANCE_PREV double not null,
BALANCE double not null,
DEPOSIT double not null,
CREDIT double not null,
PROFIT_CLOSED double not null,
PROFIT double not null,
EQUITY double not null,
MARGIN double not null,
MARGIN_FREE double not null,
MODIFY_TIME datetime not null,
primary key (LOGIN, TIME)
);

@subkanthi
Copy link
Collaborator

subkanthi commented Jul 20, 2023

HI @melnikov-tm , can you try pulling the latest image again.
I'm not able to reproduce the issue.

MySQL

create table daily2(TIME datetime not null);
insert into daily2(TIME) values('1000-01-01 00:00:00');
insert into daily2(TIME) values('9999-12-31 23:59:59');

ClickHouse

 select * from daily2;

SELECT *
FROM daily2

Query id: 3b3c1d75-a571-4245-8033-dae367288a7d

┌─my_row_id─┬────────────────────TIME─┬──────_version─┬─is_deleted─┐
│         1 │ 1925-01-01 00:00:00.000 │ 1689883280000 │          0 │
│         2 │ 2283-11-11 23:59:59.999 │ 1689883280000 │          0 │
└───────────┴─────────────────────────┴───────────────┴────────────┘

@melnikov-tm
Copy link
Author

@subkanthi that resolved it. Looks like I used an old image. Thanks and apologies for the false alarm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants