{"record":{"id":"5e2f65318f78b69c","repo":"jd-opensource/joyagent-jdgenie","slug":"error-5e2f65","errorCode":null,"errorMessage":"集合名为空！","messagePattern":"集合名为空！","errorType":"validation","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"genie-backend/src/main/java/com/jd/genie/service/QdrantService.java","lineNumber":135,"sourceCode":"                        .setCollectionName(collectionName)\n                        .setFilter(filter)\n                        .setOffset(offset)\n                        .setLimit(size)\n                        .setWithPayload(enable(true))\n                        .build()).get();\n    }\n\n    public void deletePointsSync(String collectionName, List<Points.PointId> ids) throws ExecutionException, InterruptedException {\n        client.deleteAsync(collectionName, ids).get();\n    }\n\n    public void deleteByFilterSync(String collectionName, Points.Filter filter) throws ExecutionException, InterruptedException {\n        client.deleteAsync(collectionName, filter).get();\n    }\n\n    public Points.UpdateResult upsertVectors(String collectionName, List<List<Float>> vectors, List<Map<String, JsonWithInt.Value>> payloads) throws ExecutionException, InterruptedException {\n        if (StringUtils.isBlank(collectionName)) {\n            throw new RuntimeException(\"集合名为空！\");\n        }\n\n        if (CollectionUtils.isEmpty(vectors)) {\n            throw new RuntimeException(\"向量集合为空！\");\n        }\n\n        if (CollectionUtils.isEmpty(payloads)) {\n            throw new RuntimeException(\"元数据集合为空！\");\n        }\n\n        if (vectors.size() != payloads.size()) {\n            throw new RuntimeException(\"向量集合大小与元数据集合大小不一致，vectorSize：\" + vectors.size() + \"，payloadSize：\" + payloads.size());\n        }\n\n        List<Points.PointStruct> pointStructList = new ArrayList<>();\n        for (int i = 0; i < vectors.size(); i++) {\n            Points.PointStruct pointStruct = Points.PointStruct.newBuilder()\n                    .setId(id(UUID.randomUUID()))","sourceCodeStart":117,"sourceCodeEnd":153,"githubUrl":"https://github.com/jd-opensource/joyagent-jdgenie/blob/2417e0b8b636d941ad5fb14c59b20dddfef5375d/genie-backend/src/main/java/com/jd/genie/service/QdrantService.java#L117-L153","documentation":"The first upsertVectors(collectionName, vectors, payloads) overload validates the collection name before building PointStructs. A blank collectionName makes the upsert impossible to address, so it throws RuntimeException(\"集合名为空！\") (collection name is empty).","triggerScenarios":"Calling upsertVectors with null/blank collectionName — usually a missing config property or an unset variable computed upstream.","commonSituations":"Missing qdrant collection setting in config file or environment; collection name constructed from an empty tenant/id field; refactoring left a caller passing null.","solutions":["Trace the caller and confirm where the blank name originates","Configure the collection name (config property or env var) and pass it explicitly","Add a startup-time validation so a missing collection config fails fast"],"exampleFix":"// before\nqdrantService.upsertVectors(null, vectors, payloads);\n// after\nif (StringUtils.isBlank(collectionName)) {\n    throw new IllegalStateException(\"qdrant collectionName is not configured\");\n}\nqdrantService.upsertVectors(collectionName, vectors, payloads);","handlingStrategy":"validation","validationCode":"if (collectionName == null || collectionName.isBlank()) {\n    throw new IllegalStateException(\"configure qdrant collection name before upsert\");\n}","typeGuard":null,"tryCatchPattern":"try {\n    qdrantService.upsertVectors(collectionName, vectors, payloads);\n} catch (RuntimeException e) {\n    if (\"集合名为空！\".equals(e.getMessage())) {\n        log.error(\"qdrant collection name not configured\");\n    } else throw e;\n}","preventionTips":["Validate collection-name configuration at application startup","Use a single config bean for the collection name instead of ad-hoc strings","Add unit tests covering blank config values"],"tags":["java","qdrant","vector-database","validation"],"backgroundTag":"empty-required-field","analyzedSha":"2417e0b8b636d941ad5fb14c59b20dddfef5375d","analyzedAt":"2026-09-08T11:28:19.414Z","contentChangedAt":"2026-09-08T11:28:19.414Z","schemaVersion":2},"datasetVersion":"2026-09-16T09:17:16.951Z"}