{"record":{"id":"916a4cab61dadb1f","repo":"apache/seatunnel","slug":"desc-collection-error","errorCode":"DESC_COLLECTION_ERROR","errorMessage":"DESC_COLLECTION_ERROR","messagePattern":"DESC_COLLECTION_ERROR","errorType":"error_code","errorClass":"MilvusConnectorException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-milvus/src/main/java/org/apache/seatunnel/connectors/seatunnel/milvus/utils/MilvusConvertUtils.java","lineNumber":132,"sourceCode":"            CatalogTable catalogTable = getCatalogTable(client, database, collection);\n            TablePath tablePath = TablePath.of(database, null, collection);\n            map.put(tablePath, catalogTable);\n        }\n        client.close();\n        return map;\n    }\n\n    public CatalogTable getCatalogTable(\n            MilvusServiceClient client, String database, String collection) {\n        R<DescribeCollectionResponse> response =\n                client.describeCollection(\n                        DescribeCollectionParam.newBuilder()\n                                .withDatabaseName(database)\n                                .withCollectionName(collection)\n                                .build());\n\n        if (response.getStatus() != R.Status.Success.getCode()) {\n            throw new MilvusConnectorException(\n                    MilvusConnectionErrorCode.DESC_COLLECTION_ERROR, response.getMessage());\n        }\n        log.info(\n                \"describe collection database: {}, collection: {}, response: {}\",\n                database,\n                collection,\n                response);\n        // collection column\n        DescribeCollectionResponse collectionResponse = response.getData();\n        CollectionSchema schema = collectionResponse.getSchema();\n        List<Column> columns = new ArrayList<>();\n        boolean existPartitionKeyField = false;\n        String partitionKeyField = null;\n        for (FieldSchema fieldSchema : schema.getFieldsList()) {\n            PhysicalColumn physicalColumn = MilvusSourceConverter.convertColumn(fieldSchema);\n            columns.add(physicalColumn);\n            if (fieldSchema.getIsPartitionKey()) {\n                existPartitionKeyField = true;","sourceCodeStart":114,"sourceCodeEnd":150,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-milvus/src/main/java/org/apache/seatunnel/connectors/seatunnel/milvus/utils/MilvusConvertUtils.java#L114-L150","documentation":"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.","triggerScenarios":"client.describeCollection(DescribeCollectionParam with databaseName/collectionName) returns status != R.Status.Success — typically collection not found, permission denied, or a Milvus internal error.","commonSituations":"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.","solutions":["Read response.getMessage() in the log/exception for the precise Milvus error (e.g. 'can't find collection')","Verify the collection exists under the exact database and collection names configured (case-sensitive)","Grant the Milvus user read/describe privileges on the collection","Confirm the collection was not dropped by another process between job submission and schema fetch","Check Milvus server logs if the status indicates an internal error"],"exampleFix":"// before\ntable_path = \"default.my_Coll\" // wrong case\n// after\ntable_path = \"default.my_coll\" // exact collection name in Milvus","handlingStrategy":"validation","validationCode":"R<Boolean> has = client.hasCollection(HasCollectionParam.newBuilder()\n    .withDatabaseName(db).withCollectionName(coll).build());\nif (has.getStatus() != R.Status.Success.getCode() || !has.getData().has())\n    throw new IllegalStateException(\"Collection not found: \" + db + \".\" + coll);","typeGuard":null,"tryCatchPattern":"try {\n  catalog.getTable(tablePath);\n} catch (MilvusConnectorException e) {\n  if (e.getErrorCode() == MilvusConnectionErrorCode.DESC_COLLECTION_ERROR) {\n    logger.error(\"describeCollection failed: {}\", e.getMessage()); // verify names/permissions\n  } else { throw e; }\n}","preventionTips":["Double-check table_path spelling and case","Ensure the collection outlives the job (disable overlapping retention cleanup)","Grant describe privileges to the Milvus user"],"tags":["milvus","catalog","schema","rpc-error"],"backgroundTag":"entity-not-found","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}