apache/seatunnel · error · MilvusConnectorException
LIST_PARTITIONS_FAILED
LIST_PARTITIONS_FAILED
Error message
Failed to show partitions:
What it means
MilvusSourceSplitEnumerator.generateSplits throws LIST_PARTITIONS_FAILED when the Milvus showPartitions RPC returns a non-success status while enumerating splits for a source collection. Split enumeration cannot proceed without the partition list, so the job fails at startup or during split generation.
Source
Thrown at seatunnel-connectors-v2/connector-milvus/src/main/java/org/apache/seatunnel/connectors/seatunnel/milvus/source/MilvusSourceSplitEnumerator.java:142
client.describeCollection(
DescribeCollectionParam.newBuilder()
.withDatabaseName(database)
.withCollectionName(collection)
.build());
boolean hasPartitionKey =
describeCollectionResponseR.getData().getSchema().getFieldsList().stream()
.anyMatch(FieldSchema::getIsPartitionKey);
List<MilvusSourceSplit> milvusSourceSplits = new ArrayList<>();
if (!hasPartitionKey) {
ShowPartitionsParam showPartitionsParam =
ShowPartitionsParam.newBuilder()
.withDatabaseName(database)
.withCollectionName(collection)
.build();
R<ShowPartitionsResponse> showPartitionsResponseR =
client.showPartitions(showPartitionsParam);
if (showPartitionsResponseR.getStatus() != R.Status.Success.getCode()) {
throw new MilvusConnectorException(
MilvusConnectionErrorCode.LIST_PARTITIONS_FAILED,
"Failed to show partitions: " + showPartitionsResponseR.getMessage());
}
List<String> partitionList = showPartitionsResponseR.getData().getPartitionNamesList();
for (String partitionName : partitionList) {
MilvusSourceSplit milvusSourceSplit =
MilvusSourceSplit.builder()
.tablePath(table.getTablePath())
.splitId(createSplitId(table.getTablePath(), partitionName))
.partitionName(partitionName)
.build();
log.info("Generated split: {}", milvusSourceSplit);
milvusSourceSplits.add(milvusSourceSplit);
}
} else {
MilvusSourceSplit milvusSourceSplit =
MilvusSourceSplit.builder()
.tablePath(table.getTablePath())View on GitHub (pinned to cf67b549a7)
Solutions
- Check the appended Milvus message in the exception — it names the RPC failure reason (e.g. 'collection not found')
- Confirm the database and collection still exist in Milvus before starting the job
- Verify the Milvus user has permission to list partitions on that collection
- If partitions change frequently, avoid partition drops during job startup or re-run the job
- Check Milvus server health/logs for internal errors
Example fix
// before: collection deleted by a retention job while the SeaTunnel job started // after: pause retention cleanup or pin a stable collection name in table_path url = "milvus://db1/coll" // ensure 'coll' exists: SHOW COLLECTIONS / attu check
Defensive patterns
Strategy: try-catch
Validate before calling
R<HasCollectionResponse> has = client.hasCollection(HasCollectionParam.newBuilder()
.withDatabaseName(db).withCollectionName(coll).build());
if (has.getStatus() != R.Status.Success.getCode() || !has.getData().has())
throw new IllegalStateException("Collection " + db + "." + coll + " not listable"); Try / catch
try {
startJob();
} catch (MilvusConnectorException e) {
if (e.getErrorCode() == MilvusConnectionErrorCode.LIST_PARTITIONS_FAILED) {
logger.error("showPartitions failed: {}", e.getMessage()); // message carries Milvus reason
// re-verify collection existence, then resubmit
} else { throw e; }
} Prevention
- Ensure collections are not dropped by retention jobs while the job starts
- Grant the Milvus user partition-listing privileges
- Use exact, case-correct database/collection names in table_path
When it happens
Trigger: client.showPartitions(ShowPartitionsParam.withDatabaseName/withCollectionName) returns status != R.Status.Success — e.g. collection deleted between catalog discovery and split enumeration, insufficient permissions, or a Milvus server error.
Common situations: Collection dropped by TTL/retention policy while the SeaTunnel job was being submitted, typo'd or case-mismatched database/collection names, Milvus user lacking privileges on the collection, or Milvus cluster instability.
Related errors
- UNSUPPORTED_OPERATION
- OPERATION_NOT_SUPPORTED
- CommonErrorCodeDeprecated.ILLEGAL_ARGUMENT
- DATABASE_NO_COLLECTIONS
- DESC_COLLECTION_ERROR
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/9feab7b30177a449.
Report an issue: GitHub.