{"record":{"id":"9feab7b30177a449","repo":"apache/seatunnel","slug":"list-partitions-failed","errorCode":"LIST_PARTITIONS_FAILED","errorMessage":"Failed to show partitions: ","messagePattern":"Failed to show partitions: ","errorType":"error_code","errorClass":"MilvusConnectorException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-milvus/src/main/java/org/apache/seatunnel/connectors/seatunnel/milvus/source/MilvusSourceSplitEnumerator.java","lineNumber":142,"sourceCode":"                client.describeCollection(\n                        DescribeCollectionParam.newBuilder()\n                                .withDatabaseName(database)\n                                .withCollectionName(collection)\n                                .build());\n        boolean hasPartitionKey =\n                describeCollectionResponseR.getData().getSchema().getFieldsList().stream()\n                        .anyMatch(FieldSchema::getIsPartitionKey);\n        List<MilvusSourceSplit> milvusSourceSplits = new ArrayList<>();\n        if (!hasPartitionKey) {\n            ShowPartitionsParam showPartitionsParam =\n                    ShowPartitionsParam.newBuilder()\n                            .withDatabaseName(database)\n                            .withCollectionName(collection)\n                            .build();\n            R<ShowPartitionsResponse> showPartitionsResponseR =\n                    client.showPartitions(showPartitionsParam);\n            if (showPartitionsResponseR.getStatus() != R.Status.Success.getCode()) {\n                throw new MilvusConnectorException(\n                        MilvusConnectionErrorCode.LIST_PARTITIONS_FAILED,\n                        \"Failed to show partitions: \" + showPartitionsResponseR.getMessage());\n            }\n            List<String> partitionList = showPartitionsResponseR.getData().getPartitionNamesList();\n            for (String partitionName : partitionList) {\n                MilvusSourceSplit milvusSourceSplit =\n                        MilvusSourceSplit.builder()\n                                .tablePath(table.getTablePath())\n                                .splitId(createSplitId(table.getTablePath(), partitionName))\n                                .partitionName(partitionName)\n                                .build();\n                log.info(\"Generated split: {}\", milvusSourceSplit);\n                milvusSourceSplits.add(milvusSourceSplit);\n            }\n        } else {\n            MilvusSourceSplit milvusSourceSplit =\n                    MilvusSourceSplit.builder()\n                            .tablePath(table.getTablePath())","sourceCodeStart":124,"sourceCodeEnd":160,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-milvus/src/main/java/org/apache/seatunnel/connectors/seatunnel/milvus/source/MilvusSourceSplitEnumerator.java#L124-L160","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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"],"exampleFix":"// before: collection deleted by a retention job while the SeaTunnel job started\n// after: pause retention cleanup or pin a stable collection name in table_path\nurl = \"milvus://db1/coll\"  // ensure 'coll' exists: SHOW COLLECTIONS / attu check","handlingStrategy":"try-catch","validationCode":"R<HasCollectionResponse> 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 \" + db + \".\" + coll + \" not listable\");","typeGuard":null,"tryCatchPattern":"try {\n  startJob();\n} catch (MilvusConnectorException e) {\n  if (e.getErrorCode() == MilvusConnectionErrorCode.LIST_PARTITIONS_FAILED) {\n    logger.error(\"showPartitions failed: {}\", e.getMessage()); // message carries Milvus reason\n    // re-verify collection existence, then resubmit\n  } else { throw e; }\n}","preventionTips":["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"],"tags":["milvus","source","split-enumeration","rpc-error"],"backgroundTag":"api-error-response","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"}