{"record":{"id":"97afd98bad44dfa4","repo":"apache/seatunnel","slug":"show-partition-error","errorCode":"SHOW_PARTITION_ERROR","errorMessage":"SHOW_PARTITION_ERROR","messagePattern":"SHOW_PARTITION_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":241,"sourceCode":"                schema.getDescription(),\n                tableId.getCatalogName(),\n                metadataBuilder.build());\n    }\n\n    private static void fillPartitionNames(\n            Map<String, String> options,\n            MilvusServiceClient client,\n            String database,\n            String collection) {\n        // not exist partition key, will read partition\n        R<ShowPartitionsResponse> partitionsResponseR =\n                client.showPartitions(\n                        ShowPartitionsParam.newBuilder()\n                                .withDatabaseName(database)\n                                .withCollectionName(collection)\n                                .build());\n        if (partitionsResponseR.getStatus() != R.Status.Success.getCode()) {\n            throw new MilvusConnectorException(\n                    MilvusConnectionErrorCode.SHOW_PARTITION_ERROR,\n                    partitionsResponseR.getMessage());\n        }\n\n        ProtocolStringList partitionNamesList =\n                partitionsResponseR.getData().getPartitionNamesList();\n        List<String> list = new ArrayList<>();\n        for (String partition : partitionNamesList) {\n            if (partition.equals(\"_default\")) {\n                continue;\n            }\n            list.add(partition);\n        }\n        if (CollectionUtils.isEmpty(list)) {\n            return;\n        }\n\n        options.put(MilvusOptions.PARTITION_NAMES, String.join(\",\", list));","sourceCodeStart":223,"sourceCodeEnd":259,"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#L223-L259","documentation":"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.","triggerScenarios":"client.showPartitions(ShowPartitionsParam with databaseName/collectionName) returns status != R.Status.Success during getCatalogTable — collection missing, permissions, or server-side failure.","commonSituations":"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.","solutions":["Check the Milvus message in the exception for the precise cause","Confirm the collection exists and the user can list partitions (test in Attu)","Verify database/collection names match exactly (case-sensitive)","Inspect Milvus server logs for internal errors during the job window","Re-run the job if the failure was transient (server overload)"],"exampleFix":"// before: user lacks permission\nuser = \"reader_no_partition_perm\"\n// after: grant partition-level privileges\n// in Milvus: GRANT PrivilegeShowPartitions ON COLLECTION db.coll TO ROLE reader","handlingStrategy":"try-catch","validationCode":"R<ShowPartitionsResponse> r = client.showPartitions(ShowPartitionsParam.newBuilder()\n    .withDatabaseName(db).withCollectionName(coll).build());\nif (r.getStatus() != R.Status.Success.getCode())\n    throw new IllegalStateException(\"showPartitions failed: \" + r.getMessage());","typeGuard":null,"tryCatchPattern":"try {\n  catalog.getTable(tablePath);\n} catch (MilvusConnectorException e) {\n  if (e.getErrorCode() == MilvusConnectionErrorCode.SHOW_PARTITION_ERROR) {\n    logger.error(\"showPartitions RPC failed: {}\", e.getMessage());\n  } else { throw e; }\n}","preventionTips":["Grant PrivilegeShowPartitions to the job's Milvus role","Avoid partition/collection drops during job startup","Retry transient failures — Milvus under load can return error statuses"],"tags":["milvus","catalog","partition","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"}