apache/seatunnel · error · MilvusConnectorException

DESC_COLLECTION_ERROR

DESC_COLLECTION_ERROR

Error message

DESC_COLLECTION_ERROR

What it means

MilvusConvertUtils.getCatalogTable throws DESC_COLLECTION_ERROR when the Milvus describeCollection RPC returns a non-success status. The connector needs the collection schema (fields, vector dimensions) to build a CatalogTable, so schema retrieval failure aborts source/sink catalog operations.

Source

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

            CatalogTable catalogTable = getCatalogTable(client, database, collection);
            TablePath tablePath = TablePath.of(database, null, collection);
            map.put(tablePath, catalogTable);
        }
        client.close();
        return map;
    }

    public CatalogTable getCatalogTable(
            MilvusServiceClient client, String database, String collection) {
        R<DescribeCollectionResponse> response =
                client.describeCollection(
                        DescribeCollectionParam.newBuilder()
                                .withDatabaseName(database)
                                .withCollectionName(collection)
                                .build());

        if (response.getStatus() != R.Status.Success.getCode()) {
            throw new MilvusConnectorException(
                    MilvusConnectionErrorCode.DESC_COLLECTION_ERROR, response.getMessage());
        }
        log.info(
                "describe collection database: {}, collection: {}, response: {}",
                database,
                collection,
                response);
        // collection column
        DescribeCollectionResponse collectionResponse = response.getData();
        CollectionSchema schema = collectionResponse.getSchema();
        List<Column> columns = new ArrayList<>();
        boolean existPartitionKeyField = false;
        String partitionKeyField = null;
        for (FieldSchema fieldSchema : schema.getFieldsList()) {
            PhysicalColumn physicalColumn = MilvusSourceConverter.convertColumn(fieldSchema);
            columns.add(physicalColumn);
            if (fieldSchema.getIsPartitionKey()) {
                existPartitionKeyField = true;

View on GitHub (pinned to cf67b549a7)

Solutions

  1. Read response.getMessage() in the log/exception for the precise Milvus error (e.g. 'can't find collection')
  2. Verify the collection exists under the exact database and collection names configured (case-sensitive)
  3. Grant the Milvus user read/describe privileges on the collection
  4. Confirm the collection was not dropped by another process between job submission and schema fetch
  5. Check Milvus server logs if the status indicates an internal error

Example fix

// before
table_path = "default.my_Coll" // wrong case
// after
table_path = "default.my_coll" // exact collection name in Milvus
Defensive patterns

Strategy: validation

Validate before calling

R<Boolean> has = client.hasCollection(HasCollectionParam.newBuilder()
    .withDatabaseName(db).withCollectionName(coll).build());
if (has.getStatus() != R.Status.Success.getCode() || !has.getData().has())
    throw new IllegalStateException("Collection not found: " + db + "." + coll);

Try / catch

try {
  catalog.getTable(tablePath);
} catch (MilvusConnectorException e) {
  if (e.getErrorCode() == MilvusConnectionErrorCode.DESC_COLLECTION_ERROR) {
    logger.error("describeCollection failed: {}", e.getMessage()); // verify names/permissions
  } else { throw e; }
}

Prevention

When it happens

Trigger: client.describeCollection(DescribeCollectionParam with databaseName/collectionName) returns status != R.Status.Success — typically collection not found, permission denied, or a Milvus internal error.

Common situations: Typo'd or case-mismatched collection name in table_path, collection dropped before the job read its schema, cross-database confusion (collection exists in another database), or an under-privileged Milvus user.

Understand the failure class

Background: "Not found" and "does not exist" errors: why "Task not found", "No such folder", and "Can't find" fire when a lookup comes back empty — this error's family across 14 libraries.

Related errors


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