Skip to content

Nothing covers two concurrent commits, or a commit racing an abort, on one video import #856

Description

@JArmandoAnaya

tests/kernel/test_video_import_concurrency.py covers concurrent appends thoroughly: disjoint ordinals, one ordinal with the same bytes (a retry), and one ordinal with different bytes (a conflict).

It covers no race on the terminal transitions. Neither of these has a test:

  • two commit calls arriving together on one session
  • a commit and an abort arriving together

commit is written to be idempotent by state (COMMITTED returns the batch it already made) and abort refuses a committed session, so the intended answers are defined. What is unverified is what the store does when both transactions reach the session row at once: the SQLite metadata store sets foreign_keys and busy_timeout but does not begin immediate, so two writers take a deferred read snapshot and the second upgrade can fail rather than wait.

The concern is the answer a caller receives - a 500 where the contract promises an idempotent result or a typed refusal - rather than the stored state, which reaches the same place either way.

Activity

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

    apivisionset.server — REST API and OpenAPI contractbackendvisionset Python distribution — kernel, server, cli, mcp, formats

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions