You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by zh...@apache.org on 2023/04/11 11:55:51 UTC
[shardingsphere] branch master updated: Keep original table name in pipeline incremental task (#25111)
This is an automated email from the ASF dual-hosted git repository.
zhonghongsheng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git
The following commit(s) were added to refs/heads/master by this push:
new 80e2fc202cb Keep original table name in pipeline incremental task (#25111)
80e2fc202cb is described below
commit 80e2fc202cb3fe24fd98d7c803808d25c195002d
Author: Xinze Guo <10...@users.noreply.github.com>
AuthorDate: Tue Apr 11 19:55:43 2023 +0800
Keep original table name in pipeline incremental task (#25111)
* Keep original table name at MySQL incremental dumper
* Keep original table name at other classes
---
.../shardingsphere/data/pipeline/api/config/ImporterConfiguration.java | 2 +-
.../data/pipeline/mysql/ingest/MySQLIncrementalDumper.java | 2 +-
.../data/pipeline/postgresql/ingest/wal/WALEventConverter.java | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/api/config/ImporterConfiguration.java b/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/api/config/ImporterConfiguration.java
index 7740caff919..0e8de72ac99 100644
--- a/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/api/config/ImporterConfiguration.java
+++ b/kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/api/config/ImporterConfiguration.java
@@ -61,7 +61,7 @@ public final class ImporterConfiguration {
* @return logic table names
*/
public Collection<String> getLogicTableNames() {
- return Collections.unmodifiableList(shardingColumnsMap.keySet().stream().map(LogicTableName::getLowercase).collect(Collectors.toList()));
+ return Collections.unmodifiableList(shardingColumnsMap.keySet().stream().map(LogicTableName::getOriginal).collect(Collectors.toList()));
}
/**
diff --git a/kernel/data-pipeline/dialect/mysql/src/main/java/org/apache/shardingsphere/data/pipeline/mysql/ingest/MySQLIncrementalDumper.java b/kernel/data-pipeline/dialect/mysql/src/main/java/org/apache/shardingsphere/data/pipeline/mysql/ingest/MySQLIncrementalDumper.java
index 493bf7f8bfa..0f1cb52891a 100644
--- a/kernel/data-pipeline/dialect/mysql/src/main/java/org/apache/shardingsphere/data/pipeline/mysql/ingest/MySQLIncrementalDumper.java
+++ b/kernel/data-pipeline/dialect/mysql/src/main/java/org/apache/shardingsphere/data/pipeline/mysql/ingest/MySQLIncrementalDumper.java
@@ -207,7 +207,7 @@ public final class MySQLIncrementalDumper extends AbstractLifecycleExecutor impl
private DataRecord createDataRecord(final AbstractRowsEvent rowsEvent, final int columnCount) {
DataRecord result = new DataRecord(new BinlogPosition(rowsEvent.getFileName(), rowsEvent.getPosition(), rowsEvent.getServerId()), columnCount);
- result.setTableName(dumperConfig.getLogicTableName(rowsEvent.getTableName()).getLowercase());
+ result.setTableName(dumperConfig.getLogicTableName(rowsEvent.getTableName()).getOriginal());
result.setCommitTime(rowsEvent.getTimestamp() * 1000);
return result;
}
diff --git a/kernel/data-pipeline/dialect/postgresql/src/main/java/org/apache/shardingsphere/data/pipeline/postgresql/ingest/wal/WALEventConverter.java b/kernel/data-pipeline/dialect/postgresql/src/main/java/org/apache/shardingsphere/data/pipeline/postgresql/ingest/wal/WALEventConverter.java
index 7322765e45a..de8127d40df 100644
--- a/kernel/data-pipeline/dialect/postgresql/src/main/java/org/apache/shardingsphere/data/pipeline/postgresql/ingest/wal/WALEventConverter.java
+++ b/kernel/data-pipeline/dialect/postgresql/src/main/java/org/apache/shardingsphere/data/pipeline/postgresql/ingest/wal/WALEventConverter.java
@@ -124,7 +124,7 @@ public final class WALEventConverter {
private DataRecord createDataRecord(final AbstractRowEvent rowsEvent, final int columnCount) {
DataRecord result = new DataRecord(new WALPosition(rowsEvent.getLogSequenceNumber()), columnCount);
- result.setTableName(dumperConfig.getLogicTableName(rowsEvent.getTableName()).getLowercase());
+ result.setTableName(dumperConfig.getLogicTableName(rowsEvent.getTableName()).getOriginal());
result.setCsn(rowsEvent.getCsn());
return result;
}