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

Update PreparedStatementExecutor.java: fix updates from postgres (update in postgres -> kafka -> clickhouse) #900

Open
wants to merge 5 commits into
base: 2.5.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions doc/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -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'; |
Expand Down
8 changes: 2 additions & 6 deletions sink-connector-lightweight/docker/log4j2.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,15 @@
additivity="false">
<AppenderRef ref="console"/>
</Logger>-->
<Logger name="io.debezium" level="ERROR"
<Logger name="io.debezium" level="INFO"
additivity="false">
<AppenderRef ref="console"/>
</Logger>
<Logger name="com.clickhouse" level="ERROR"
additivity="false">
<AppenderRef ref="console"/>
</Logger>
<Logger name="io.debezium" level="ERROR"
additivity="false">
<AppenderRef ref="console"/>
</Logger>
<Root level="warn" additivity="false">
<Root level="info" additivity="false">
<AppenderRef ref="console" />
</Root>
</Loggers>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -330,8 +330,10 @@ public void insertPreparedStatement(Map<String, Integer> 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());
}
}

Expand Down
Loading