From 8c09056135d2ac05e3223c97a77b2e99bb763d19 Mon Sep 17 00:00:00 2001 From: Kanthi Date: Fri, 25 Oct 2024 23:57:42 -0400 Subject: [PATCH 1/3] Update configuration.md Update configuration.md to include topic.prefix --- doc/configuration.md | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/configuration.md b/doc/configuration.md index c333e642f..d21ce4dbc 100644 --- a/doc/configuration.md +++ b/doc/configuration.md @@ -2,6 +2,7 @@ ### Configuration Reference Configuration | Description | |-----------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| topic.prefix | Unique name for connector. | database.hostname | Source Database HostName | | database.port | Source Database Port number | | database.user | Source Database Username(user needs to have replication permission, Refer https://debezium.io/documentation/reference/stable/connectors/mysql.html) GRANT SELECT, RELOAD, SHOW DATABASES, REPLICATION SLAVE, REPLICATION CLIENT ON *.* TO 'user' IDENTIFIED BY 'password'; | From 102b000cbcea9e6dfd418fda4654b316630c4118 Mon Sep 17 00:00:00 2001 From: Kanthi Date: Thu, 31 Oct 2024 12:46:20 -0400 Subject: [PATCH 2/3] Update log4j2.xml Update log4j2.xml changes to have sink connector in INFO level. --- sink-connector-lightweight/docker/log4j2.xml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/sink-connector-lightweight/docker/log4j2.xml b/sink-connector-lightweight/docker/log4j2.xml index ce546897c..8bf89fcc6 100644 --- a/sink-connector-lightweight/docker/log4j2.xml +++ b/sink-connector-lightweight/docker/log4j2.xml @@ -11,7 +11,7 @@ additivity="false"> --> - @@ -19,11 +19,7 @@ additivity="false"> - - - - + From 053cc33169509a200ce6d6dc9339f80824d3604e Mon Sep 17 00:00:00 2001 From: Salisbury Date: Mon, 4 Nov 2024 07:27:56 +0300 Subject: [PATCH 3/3] Update PreparedStatementExecutor.java: fix updates closes https://github.com/Altinity/clickhouse-sink-connector/issues/899 --- .../sink/connector/db/batch/PreparedStatementExecutor.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sink-connector/src/main/java/com/altinity/clickhouse/sink/connector/db/batch/PreparedStatementExecutor.java b/sink-connector/src/main/java/com/altinity/clickhouse/sink/connector/db/batch/PreparedStatementExecutor.java index a7b321d08..c94f0294d 100644 --- a/sink-connector/src/main/java/com/altinity/clickhouse/sink/connector/db/batch/PreparedStatementExecutor.java +++ b/sink-connector/src/main/java/com/altinity/clickhouse/sink/connector/db/batch/PreparedStatementExecutor.java @@ -330,8 +330,10 @@ public void insertPreparedStatement(Map columnNameToIndexMap, P } else { ps.setLong(columnNameToIndexMap.get(versionColumn), record.getGtid()); } - } else { + } else if (record.getSequenceNumber() != -1) { ps.setLong(columnNameToIndexMap.get(versionColumn), record.getSequenceNumber()); + } else { + ps.setLong(columnNameToIndexMap.get(versionColumn), record.getLsn()); } }