Skip to content

Commit b567c22

Browse files
committed
fix(bug): 修复schema被反引号包裹时匹配不到的问题
1 parent a765ea5 commit b567c22

File tree

1 file changed

+1
-0
lines changed
  • client-adapter/escore/src/main/java/com/alibaba/otter/canal/client/adapter/es/core

1 file changed

+1
-0
lines changed

client-adapter/escore/src/main/java/com/alibaba/otter/canal/client/adapter/es/core/ESAdapter.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ private void addSyncConfigToCache(String configName, ESSyncConfig config) {
145145
schemaItem.getAliasTableItems().values().forEach(tableItem -> {
146146
Map<String, ESSyncConfig> esSyncConfigMap;
147147
String schemaKey = tableItem.getSchema() == null ? schema : tableItem.getSchema();
148+
schemaKey = StringUtils.trimToEmpty(schemaKey).replaceAll("[`']", "");
148149
if (envProperties != null && !"tcp".equalsIgnoreCase(envProperties.getProperty("canal.conf.mode"))) {
149150
esSyncConfigMap = dbTableEsSyncConfig
150151
.computeIfAbsent(StringUtils.trimToEmpty(config.getDestination()) + "-"

0 commit comments

Comments
 (0)