We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
1.1.3中新增的对 Message 的 partition 逻辑,如果一个 Canal Entry 包含 n 个 rowData,则 Canal Entry 在partition 之后会重复 n 倍
// canal/server/src/main/java/com/alibaba/otter/canal/common/MQMessageUtils.java for (CanalEntry.RowData rowData : rowChange.getRowDatasList()) { int hashCode = table.hashCode(); if (hashMode.autoPkHash) { // isEmpty use default pkNames for (CanalEntry.Column column : rowData.getAfterColumnsList()) { if (column.getIsKey()) { hashCode = hashCode ^ column.getValue().hashCode(); } } } else if (!hashMode.tableHash) { for (CanalEntry.Column column : rowData.getAfterColumnsList()) { if (checkPkNamesHasContain(hashMode.pkNames, column.getName())) { hashCode = hashCode ^ column.getValue().hashCode(); } } } int pkHash = Math.abs(hashCode) % partitionsNum; pkHash = Math.abs(pkHash); partitionEntries[pkHash].add(entry); }
对于一个n行的表 t delete from t; Canal Entry 的 rowData 会产生多行
delete from t;
partition 后产生一个 Entry
partition 后产生n个 Entry
The text was updated successfully, but these errors were encountered:
建议先改为flatMessage模式
Sorry, something went wrong.
1.1.3 alpha-3 已经修复
No branches or pull requests
environment
Issue Description
1.1.3中新增的对 Message 的 partition 逻辑,如果一个 Canal Entry 包含 n 个 rowData,则 Canal Entry 在partition 之后会重复 n 倍
Steps to reproduce
对于一个n行的表 t
delete from t;
Canal Entry 的 rowData 会产生多行
Expected behaviour
partition 后产生一个 Entry
Actual behaviour
partition 后产生n个 Entry
The text was updated successfully, but these errors were encountered: