{"record":{"id":"e6bf0df13dbc3a08","repo":"TencentCloud/TencentDB-Agent-Memory","slug":"tag-vectorstore-is-in-degraded-mode-refusing","errorCode":null,"errorMessage":"${TAG} VectorStore is in degraded mode — refusing to proceed without functional store","messagePattern":"(.+?) VectorStore is in degraded mode — refusing to proceed without functional store","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"critical","filePath":"MemoryCore/src/utils/pipeline-factory.ts","lineNumber":312,"sourceCode":"): Promise<StoreInitResult> {\n  let vectorStore: IMemoryStore | undefined;\n  let embeddingService: EmbeddingService | undefined;\n  let needsReindex = false;\n  let reindexReason: string | undefined;\n\n  try {\n    const bundle = createStoreBundle(cfg, {\n      dataDir: pluginDataDir,\n      logger,\n    });\n    vectorStore = bundle.store;\n    embeddingService = bundle.embedding ?? undefined;\n\n    const providerInfo = embeddingService?.getProviderInfo();\n    const initResult = await vectorStore.init(providerInfo);\n\n    if (vectorStore.isDegraded()) {\n      throw new Error(`${TAG} VectorStore is in degraded mode — refusing to proceed without functional store`);\n    } else {\n      logger.debug?.(\n        `${TAG} Store initialized: backend=${cfg.storeBackend}, provider=${cfg.embedding.provider}`,\n      );\n      needsReindex = initResult.needsReindex;\n      reindexReason = initResult.reason;\n\n      // ── Manifest: first-write + config-drift detection ──\n      try {\n        const currentStoreInfo = buildStoreInfo(bundle.storeSnapshot);\n        const existing = readManifest(pluginDataDir);\n\n        if (!existing) {\n          // First init — write manifest\n          const manifest: Manifest = {\n            version: 1,\n            createdAt: new Date().toISOString(),\n            store: currentStoreInfo,","sourceCodeStart":294,"sourceCodeEnd":330,"githubUrl":"https://github.com/TencentCloud/TencentDB-Agent-Memory/blob/3efcd317b84146d6a08518ac0f7ee7c8a8d200ec/MemoryCore/src/utils/pipeline-factory.ts#L294-L330","documentation":"During pipeline startup, _doInitStores initializes the VectorStore with the embedding provider info. If vectorStore.isDegraded() is true afterwards — meaning the store fell back to a non-functional stub (e.g. backend connection or init failed) — the factory throws rather than building a pipeline that would silently lose memory operations.","triggerScenarios":"createPipeline/initStores runs while the configured store backend (e.g. a vector DB) is unreachable, misconfigured, or its init() failed causing the store to enter degraded mode.","commonSituations":"Vector DB container not started; wrong storeBackend config; embedding provider endpoint down during store init; network/firewall blocking the store port in prod.","solutions":["Check vector DB connectivity/credentials for the configured cfg.storeBackend","Fix the embedding provider config — a failed provider probe can push the store into degraded mode","Inspect logs just before the throw for the store's own init failure reason","If degradation is expected/acceptable in your env, gate with an explicit override instead of proceeding silently"],"exampleFix":"// before\ncfg.storeBackend = \"qdrant\"; // server not running\n// after\ncfg.storeBackend = \"local\"; // or start qdrant before boot","handlingStrategy":"try-catch","validationCode":"await vectorStore.init(providerInfo);\nif (vectorStore.isDegraded()) { logger.error('vector store degraded; fix backend before starting pipeline'); process.exit(1); }","typeGuard":null,"tryCatchPattern":"try { await factory.initStores(); } catch (e) { if (e.message.includes('degraded mode')) { logger.error('Vector store backend unreachable/misconfigured:', e.message); process.exit(1); } throw e; }","preventionTips":["Monitor vector DB availability before service start (readiness probe)","Validate storeBackend config values against supported backends","Test embedding provider connectivity during startup","Fail fast on degraded stores rather than allowing silent data loss"],"tags":["vector-store","initialization","degraded-mode"],"backgroundTag":"vector-store-degraded","analyzedSha":"3efcd317b84146d6a08518ac0f7ee7c8a8d200ec","analyzedAt":"2026-09-01T05:44:22.276Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}