Skip to content

Pin real-Node store-lock contention and killed-holder recovery as an automated test #617

Backlog

Description

@ocsi-triager

Guard: tests only

Store-lock contention between a real-Node process and a Bun process is measured but not pinned. The unit suite exercises the errcode/errno classifier through Bun's node:sqlite shim (mutation-checked: deleting the numeric branches fails 7 lock/concurrency tests); the Node side is pinned only as a single uncontended writer inside integration/pi/node-launcher.test.ts.

What is measured today (2026-11-30, seat notes)

Two processes, one lock database, PRAGMA busy_timeout = 0, holder runs BEGIN IMMEDIATE and sleeps; waiter attempts BEGIN IMMEDIATE:

holder waiter result
Bun 1.4.4 Bun 1.4.4 refused, ERR_SQLITE_ERROR errcode:5
Node 22.23.4 Node 22.23.4 refused, ERR_SQLITE_ERROR errcode:5
Bun 1.4.4 Node 22.23.4 refused, ERR_SQLITE_ERROR errcode:5
Node 22.23.4 Bun 1.4.4 refused, ERR_SQLITE_ERROR errcode:5

Killed-holder recovery is likewise ADR-asserted from a spike, with no test.

Add

  1. An integration script pair (plain .mjs, node:sqlite only — no TS loader needed) that runs the four holder/waiter combinations above against one lock db and asserts the waiter is refused with busy-class errcode low byte 5, and that the combination Bun-holder ⇄ Node-waiter is never green-on-acquisition.
  2. A killed-holder case: SIGKILL the holder between BEGIN IMMEDIATE and rollback; a fresh waiter from the other runtime must acquire.

Both run under the pi CI job (Node 22 pinned there already).

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions