apache/seatunnel · error · MilvusConnectorException

SHOW_PARTITION_ERROR

SHOW_PARTITION_ERROR

Error message

SHOW_PARTITION_ERROR

What it means

MilvusConvertUtils.fillPartitionNames throws SHOW_PARTITION_ERROR when the Milvus showPartitions RPC returns a non-success status while populating partition names on the CatalogTable. The exception includes the Milvus response message, which identifies the underlying RPC failure.

Source

Thrown at seatunnel-connectors-v2/connector-milvus/src/main/java/org/apache/seatunnel/connectors/seatunnel/milvus/utils/MilvusConvertUtils.java:241

                schema.getDescription(),
                tableId.getCatalogName(),
                metadataBuilder.build());
    }

    private static void fillPartitionNames(
            Map<String, String> options,
            MilvusServiceClient client,
            String database,
            String collection) {
        // not exist partition key, will read partition
        R<ShowPartitionsResponse> partitionsResponseR =
                client.showPartitions(
                        ShowPartitionsParam.newBuilder()
                                .withDatabaseName(database)
                                .withCollectionName(collection)
                                .build());
        if (partitionsResponseR.getStatus() != R.Status.Success.getCode()) {
            throw new MilvusConnectorException(
                    MilvusConnectionErrorCode.SHOW_PARTITION_ERROR,
                    partitionsResponseR.getMessage());
        }

        ProtocolStringList partitionNamesList =
                partitionsResponseR.getData().getPartitionNamesList();
        List<String> list = new ArrayList<>();
        for (String partition : partitionNamesList) {
            if (partition.equals("_default")) {
                continue;
            }
            list.add(partition);
        }
        if (CollectionUtils.isEmpty(list)) {
            return;
        }

        options.put(MilvusOptions.PARTITION_NAMES, String.join(",", list));

View on GitHub (pinned to cf67b549a7)

Solutions

  1. Check the Milvus message in the exception for the precise cause
  2. Confirm the collection exists and the user can list partitions (test in Attu)
  3. Verify database/collection names match exactly (case-sensitive)
  4. Inspect Milvus server logs for internal errors during the job window
  5. Re-run the job if the failure was transient (server overload)

Example fix

// before: user lacks permission
user = "reader_no_partition_perm"
// after: grant partition-level privileges
// in Milvus: GRANT PrivilegeShowPartitions ON COLLECTION db.coll TO ROLE reader
Defensive patterns

Strategy: try-catch

Validate before calling

R<ShowPartitionsResponse> r = client.showPartitions(ShowPartitionsParam.newBuilder()
    .withDatabaseName(db).withCollectionName(coll).build());
if (r.getStatus() != R.Status.Success.getCode())
    throw new IllegalStateException("showPartitions failed: " + r.getMessage());

Try / catch

try {
  catalog.getTable(tablePath);
} catch (MilvusConnectorException e) {
  if (e.getErrorCode() == MilvusConnectionErrorCode.SHOW_PARTITION_ERROR) {
    logger.error("showPartitions RPC failed: {}", e.getMessage());
  } else { throw e; }
}

Prevention

When it happens

Trigger: client.showPartitions(ShowPartitionsParam with databaseName/collectionName) returns status != R.Status.Success during getCatalogTable — collection missing, permissions, or server-side failure.

Common situations: Collection dropped between describeCollection and showPartitions calls, Milvus user lacking partition read privileges, Milvus cluster under load returning internal errors, or database/collection name mismatches.

Related errors


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