{"record":{"id":"572abecb6dbe6c28","repo":"mem0ai/mem0","slug":"databricks-index-status-did-not-report-a-readiness","errorCode":null,"errorMessage":"Databricks index status did not report a readiness flag after sync.","messagePattern":"Databricks index status did not report a readiness flag after sync\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"mem0-ts/src/oss/src/vector_stores/databricks.ts","lineNumber":1250,"sourceCode":"      `Timed out waiting for Databricks endpoint ${this.endpointName} to become ready.`,\n    );\n  }\n\n  private async waitForIndexReadiness(): Promise<void> {\n    const deadline = Date.now() + this.syncTimeoutMs;\n\n    while (Date.now() <= deadline) {\n      const response = await this.httpClient.get(\n        `/indexes/${encodeURIComponent(this.fullIndexName)}`,\n      );\n      const ready = response?.data?.status?.ready;\n\n      if (ready === true) {\n        return;\n      }\n\n      if (ready !== false) {\n        throw new Error(\n          \"Databricks index status did not report a readiness flag after sync.\",\n        );\n      }\n\n      if (this.syncPollIntervalMs > 0) {\n        await new Promise((resolve) =>\n          setTimeout(resolve, this.syncPollIntervalMs),\n        );\n      }\n    }\n\n    throw new Error(\n      `Timed out waiting for Databricks index ${this.fullIndexName} to become ready after sync.`,\n    );\n  }\n\n  private shouldPaginateForLocalFiltering(filters?: SearchFilters): boolean {\n    if (!filters || Object.keys(filters).length === 0) {","sourceCodeStart":1232,"sourceCodeEnd":1268,"githubUrl":"https://github.com/mem0ai/mem0/blob/001c235229be8795e3834520467bd0d661ed8f34/mem0-ts/src/oss/src/vector_stores/databricks.ts#L1232-L1268","documentation":"Thrown when polling GET /indexes/{fullIndexName} after a sync operation and the response's status.ready field is neither true nor false (i.e. undefined/null). The provider treats a missing readiness flag as a malformed or unexpected API response rather than 'not ready', and fails fast instead of looping on an unknowable state.","triggerScenarios":"Any insert/update flow that triggers index sync, then calls waitForIndexReadiness(), when the Databricks API response for the index omits data.status.ready (different API version, index in a deleted/failed state, or response shape change).","commonSituations":"Databricks REST API version drift between workspace versions; index was deleted out-of-band while the app was syncing; the fullIndexName (schema.index) does not exist so the response has no status object; Databricks returning an error payload that is not shaped as expected.","solutions":["Log the raw response body of GET /indexes/{fullIndexName} to confirm what status is actually returned; a missing ready flag usually means the index is missing or in a terminal state.","Verify fullIndexName uses the correct 'catalog.schema.index' format and that the index exists in the Databricks UI.","Recreate the index if it was dropped or failed to create, then retry the operation.","Check for Databricks API version differences on your workspace and pin/upgrade the mem0-ts version that matches it."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"const res = await client.get(`/api/2.0/vector-search/indexes/${encodeURIComponent(fullIndexName)}`);\nconst ready = res?.data?.status?.ready;\nif (typeof ready !== 'boolean') {\n  // index missing or in a terminal state: recreate or alert before syncing\n  console.error('Index status payload unexpected:', JSON.stringify(res?.data));\n}","typeGuard":"const hasReadinessFlag = (res: unknown): res is { data: { status: { ready: boolean } } } =>\n  typeof (res as any)?.data?.status?.ready === 'boolean';","tryCatchPattern":"try {\n  await store.insert(vectors, ids, payloads);\n} catch (e) {\n  if (e instanceof Error && e.message.includes('did not report a readiness flag')) {\n    // inspect/recreate the index in Databricks, then retry the insert\n  }\n  throw e;\n}","preventionTips":["Verify the index exists and is healthy in the Databricks UI before running sync-triggering workloads.","Use the exact 'catalog.schema.index' fullIndexName format in config.","Pin a mem0-ts version tested against your workspace's Databricks API version."],"tags":["databricks","api-contract","sync","vector-store","typescript"],"backgroundTag":null,"analyzedSha":"001c235229be8795e3834520467bd0d661ed8f34","analyzedAt":"2026-08-15T01:55:42.685Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}