Skip to content

Race condition: create_table returns success before table is available #687

Description

@kriszyp

Problem

create_table (via the operations API) returns a success response before the table is fully initialized and available for subsequent operations. Downstream calls made immediately after creation fail as if the table does not exist — even with 2-second sleep guards in tests.

Observed in CI runs (GitHub Actions) across multiple runs.

Symptoms

  • Test calls create_table → receives success response
  • Test (optionally sleeps 2s) → calls insert or queries the table
  • Failure: table not found / does not exist

Likely cause

The ITC-based schema sync path acknowledges the schema event synchronously on receipt and runs the actual schema handler in the background (see commit 59dec882). This means the API response can be sent before the worker threads have fully propagated the new table schema. If a subsequent operation lands on a worker that hasn't yet processed the background handler, the table appears absent.

Steps to reproduce

Flaky; occurs under CI load. Integration test: 16_terminologyUpdates.js L52 in the operations API test suite.

🤖 Filed by Claude on behalf of Kris.

Metadata

Metadata

Assignees

Labels

area:storageStorage engine, LMDB/RocksDB, compactionbugSomething isn't workingfrom-jiraMigrated or originated from a Jira ticket

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions