apache/seatunnel · warning

TopicPartition ' ' matched by multiple table configs…

Error message

TopicPartition '{}' matched by multiple table configs. Keeping '{}' and ignoring '{}'.

What it means

In the multi-table Pulsar source, the same Pulsar TopicPartition was matched by more than one table's config (table path patterns overlap). The discoverer keeps the first table that claimed the partition (existing mapping) and ignores the later one, logging this warning so data misrouting from overlapping patterns is visible.

Solutions

  1. Make table topic patterns non-overlapping so each topic partition matches exactly one table
  2. Remove the duplicate/overlapping table config entry
  3. Verify which table was kept ('{}' first value) and confirm that is the intended owner

Example fix

// before (overlapping)
tables:
  - table_a: {topic_pattern: "app.*"}
  - table_b: {topic_pattern: "app.orders"}
// after
  - table_a: {topic_pattern: "app.users"}
  - table_b: {topic_pattern: "app.orders"}
Defensive patterns

Strategy: validation

Validate before calling

// assert no topic matches two table patterns before submitting
Set<String> overlaps = matchAllTopics(patterns).entrySet().stream().filter(e -> e.getValue().size() > 1).map(Map.Entry::getKey).collect(toSet()); if (!overlaps.isEmpty()) throw new IllegalStateException("overlapping patterns for " + overlaps);

Prevention

When it happens

Trigger: getSubscribedTopicPartitions iterates discovererPairs and finds a TopicPartition already mapped to a different TablePath via putIfAbsent — i.e., two table configs (e.g. overlapping topic patterns) both match the same topic partition.

Common situations: Two table configs with overlapping topic name-space patterns (e.g. 'app.*' and 'app.orders'); copy-pasted table configs pointing at the same topic; wildcard patterns accidentally covering a specific table's topic.

Understand the failure class

Background: Conflicting config options: "cannot be used together" — configuration validation errors across open-source libraries — this error's family across 162 libraries.

Related errors


AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10). Data as JSON: /api/errors/d76a1c15415c41b8. Report an issue: GitHub.

Appendix: source

Thrown at seatunnel-connectors-v2/connector-pulsar/src/main/java/org/apache/seatunnel/connectors/seatunnel/pulsar/source/enumerator/discoverer/MultiTablePartitionDiscoverer.java:67

    private final List<TableDiscovererPair> discovererPairs;
    private final Map<TopicPartition, TablePath> partitionToTablePath = new HashMap<>();

    public MultiTablePartitionDiscoverer(List<TableDiscovererPair> discovererPairs) {
        this.discovererPairs = discovererPairs;
    }

    @Override
    public Set<TopicPartition> getSubscribedTopicPartitions(PulsarAdmin admin) {
        Set<TopicPartition> allPartitions = new HashSet<>();
        partitionToTablePath.clear();

        for (TableDiscovererPair pair : discovererPairs) {
            Set<TopicPartition> partitions = pair.discoverer.getSubscribedTopicPartitions(admin);
            for (TopicPartition tp : partitions) {
                TablePath existing = partitionToTablePath.putIfAbsent(tp, pair.tablePath);
                if (existing != null && !existing.equals(pair.tablePath)) {
                    LOG.warn(
                            "TopicPartition '{}' matched by multiple table configs. Keeping '{}' and ignoring '{}'.",
                            tp,
                            existing,
                            pair.tablePath);
                }
            }
            allPartitions.addAll(partitions);
        }
        return allPartitions;
    }

    public TablePath getTablePath(TopicPartition partition) {
        return partitionToTablePath.get(partition);
    }

    public boolean hasTopicPattern() {
        return discovererPairs.stream().anyMatch(TableDiscovererPair::isTopicPattern);
    }

View on GitHub (pinned to cf67b549a7)