Skip to content

ensure_tables() ignores key types, and concurrent table creation raises ResourceInUseError #86

Closed

Description

@fctl-sh

Priority: medium.

  • ensure_tables() compares key names only (table.py, sync_with), although its docstring promises a TypeError when the table's key differs; description.attribute_types holds the types. A table created with ("sensor", "N"), ("seq", "S") for a model with sensor: str, seq: int passes, and every later write fails with "Type mismatch for key".
  • Concurrent create_tables(exist_ok=True) or ensure_tables() raise ResourceInUseError (client.py): they check that the table exists and then send CreateTable, without handling a table created in between. Two replicas starting together, or pytest-xdist workers, fail. Treat ResourceInUseError as "exists" when exist_ok (and wait for the table).

Found in a review of the library for bugs (fctl session); the fixes that fit in its ten pull requests are #61 to #65, #67 to #70 and #72.

Activity

  1. added
    bug
    on Oct 30, 2026
  2. added a commit that references this issue on Oct 31, 2026
    9414542
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions