{"record":{"id":"5271d77ff71c10f8","repo":"Tencent/WeKnora","slug":"failed-to-await-load-collection-w","errorCode":null,"errorMessage":"failed to await load collection: %w","messagePattern":"failed to await load collection: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/application/repository/retriever/milvus/repository.go","lineNumber":203,"sourceCode":"\t\t\tlog.Errorf(\"[Milvus] Failed to create collection: %v\", err)\n\t\t\treturn fmt.Errorf(\"failed to create collection: %w\", err)\n\t\t}\n\n\t\tlog.Infof(\"[Milvus] Successfully created collection %s\", collectionName)\n\t}\n\n\tloadOpt := client.NewLoadCollectionOption(collectionName)\n\tif m.replicaNumber > 0 {\n\t\tloadOpt = loadOpt.WithReplica(m.replicaNumber)\n\t}\n\tloadTask, err := m.client.LoadCollection(ctx, loadOpt)\n\tif err != nil {\n\t\tlog.Errorf(\"[Milvus] Failed to load collection: %v\", err)\n\t\treturn fmt.Errorf(\"failed to load collection: %w\", err)\n\t}\n\tif err := loadTask.Await(ctx); err != nil {\n\t\tlog.Errorf(\"[Milvus] Failed to await load collection: %v\", err)\n\t\treturn fmt.Errorf(\"failed to await load collection: %w\", err)\n\t}\n\n\t// Mark as initialized\n\tm.initializedCollections.Store(dimension, true)\n\treturn nil\n}\n\nfunc (m *milvusRepository) EngineType() types.RetrieverEngineType {\n\treturn types.MilvusRetrieverEngineType\n}\n\nfunc (m *milvusRepository) Support() []types.RetrieverType {\n\treturn []types.RetrieverType{types.KeywordsRetrieverType, types.VectorRetrieverType}\n}\n\n// EstimateStorageSize calculates the estimated storage size for a list of indices\nfunc (m *milvusRepository) EstimateStorageSize(ctx context.Context,\n\tindexInfoList []*types.IndexInfo, params map[string]any,","sourceCodeStart":185,"sourceCodeEnd":221,"githubUrl":"https://github.com/Tencent/WeKnora/blob/988cbb03305e055d8ebb7d46d9ac6cc0803cd074/internal/application/repository/retriever/milvus/repository.go#L185-L221","documentation":"Milvus collection bootstrap: LoadCollection was accepted but the async load task's Await failed, meaning the collection did not reach a loaded state within the wait (timeout or load error) and the bootstrap aborts before writes proceed.","triggerScenarios":"Thrown at internal/application/repository/retriever/milvus/repository.go:203 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Increase the await timeout or inspect load progress in Milvus","Check query-node health and memory pressure","Retry the ensureCollection bootstrap"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"988cbb03305e055d8ebb7d46d9ac6cc0803cd074","analyzedAt":"2026-09-02T14:41:08.344Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}