{"record":{"id":"e9dec24a7da7c126","repo":"mem0ai/mem0","slug":"baidu-mochow-table-this-tablename-was-not-w","errorCode":null,"errorMessage":"Baidu Mochow table '${this.tableName}' was not ${what} after ${(TABLE_POLL_ATTEMPTS * TABLE_POLL_INTERVAL_MS) / 1000}s.","messagePattern":"Baidu Mochow table '(.+?)' was not (.+?) after (.+?)s\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"warning","filePath":"mem0-ts/src/oss/src/vector_stores/baidu.ts","lineNumber":305,"sourceCode":"  private filterOf(filters?: SearchFilters): string | undefined {\n    return filters && Object.keys(filters).length > 0\n      ? this.buildFilter(filters)\n      : undefined;\n  }\n\n  private async pollTable(\n    client: MochowClient,\n    settled: (response: DescTableResponse) => boolean,\n    what: string,\n  ): Promise<void> {\n    for (let attempt = 0; attempt < TABLE_POLL_ATTEMPTS; attempt++) {\n      if (settled(await client.descTable(this.databaseName, this.tableName))) {\n        return;\n      }\n      await sleep(TABLE_POLL_INTERVAL_MS);\n    }\n\n    throw new Error(\n      `Baidu Mochow table '${this.tableName}' was not ${what} after ${(TABLE_POLL_ATTEMPTS * TABLE_POLL_INTERVAL_MS) / 1000}s.`,\n    );\n  }\n\n  private async ensureTable(): Promise<void> {\n    const sdk = await this.loadSdk();\n    const client = await this.ensureClient();\n    const { ServerErrCode, TableState } = sdk;\n\n    check(\n      await client.createDatabase(this.databaseName),\n      `createDatabase '${this.databaseName}'`,\n      ServerErrCode.DBAlreadyExist,\n    );\n\n    const created = check(\n      await client.createTable({\n        ...this.ns,","sourceCodeStart":287,"sourceCodeEnd":323,"githubUrl":"https://github.com/mem0ai/mem0/blob/001c235229be8795e3834520467bd0d661ed8f34/mem0-ts/src/oss/src/vector_stores/baidu.ts#L287-L323","documentation":"After creating or dropping the Mochow table, pollTable repeatedly calls descTable until a caller-supplied settled() predicate confirms the target state, sleeping TABLE_POLL_INTERVAL_MS between attempts. If the table has not reached the state after TABLE_POLL_ATTEMPTS attempts, it throws, naming the table, the expected state ('created'/'dropped'), and the total wait in seconds. This handles Mochow's eventually-consistent table lifecycle.","triggerScenarios":"First use of the Baidu store where table creation is still propagating on a slow/busy cluster; dropping then immediately recreating the same table; Baidu service degradation making descTable return stale states for the whole window.","commonSituations":"Slow Baidu regions or heavy provisioning load; concurrent instances racing create/drop of the same table; SDK/service version drift in state reporting.","solutions":["Simply retry constructing Memory / re-running the operation: the table usually settles shortly after the timeout.","If it persists, inspect the table state in the Baidu console and let provisioning finish or clear a stuck state manually.","Avoid drop/recreate churn of the same table name in quick succession."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"async function withTablePollRetry(init: () => Promise<void>, attempts = 3) {\n  for (let i = 0; i < attempts; i++) {\n    try { await init(); return; }\n    catch (e) {\n      if (e instanceof Error && /was not .* after \\d+s/.test(e.message)) { await new Promise(r => setTimeout(r, 5000)); continue; }\n      throw e;\n    }\n  }\n  throw new Error('Baidu table never settled');\n}","preventionTips":["Wrap first-time Baidu initialization in a retry wrapper sized to provisioning lag.","Pre-create tables ahead of deploy time so runtime never waits on propagation.","Do not drop and immediately recreate the same table name in automated flows."],"tags":["baidu","mochow","eventual-consistency","timeout","retry"],"backgroundTag":null,"analyzedSha":"001c235229be8795e3834520467bd0d661ed8f34","analyzedAt":"2026-08-15T01:55:42.685Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}