Skip to content

Commit

Permalink
feat(logs): l
Browse files Browse the repository at this point in the history
  • Loading branch information
hekike committed Sep 15, 2023
1 parent dd74d0d commit 374227d
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import com.clickhouse.kafka.connect.sink.db.mapping.Column;
import com.clickhouse.kafka.connect.sink.db.mapping.Table;
import com.clickhouse.kafka.connect.util.Mask;
import com.clickhouse.kafka.connect.util.Utils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand Down Expand Up @@ -175,10 +176,13 @@ public List<Table> extractTablesMapping() {
public List<Table> extractTablesMapping(Map<String, Table> cache) {
List<Table> tableList = new ArrayList<>();
for (String tableName : showTables() ) {
// Table names are escaped in the cache
String escapedTableName = Utils.escapeTopicName(tableName);

// Read from cache if we already described this table before
// This means we won't pick up edited table configs until the connector is restarted
if (cache.containsKey(tableName)) {
tableList.add(cache.get(tableName));
if (cache.containsKey(escapedTableName)) {
tableList.add(cache.get(escapedTableName));
continue;
}

Expand Down

0 comments on commit 374227d

Please sign in to comment.