Skip to content

Revert #2574 (notify-based runner-lock wake) once rocksdb-js with #849 is pinned #2576

Open

Description

@kriszyp

#2574 is a temporary workaround, not the design. It takes the derived-index runner lock without an unlock callback and wakes waiting runners through the readiness buffer's notify(), a self-notification skip, and a 5 s retry timer — because with the pinned rocksdb-js, a tryLock(key, callback) waiter queued by a worker that is later terminate()d aborts the process on Node 22 when another thread unlocks (rocksdb-js#848). That is a bug in the primitive, fixed at the root by rocksdb-js#849 (a dying env's queued lock callbacks are released from its cleanup hook; the release paths hold locksMutex across the tsfn calls).

The lock's own unlock callback is the simpler and more correct wake: one primitive, and a holder that dies releases natively and wakes the waiters immediately, where the workaround waits for a commit or up to 5 s. Once the fix is pinned, revert.

Checklist

Verification that the fix alone suffices: main's runtime unchanged against a #849 binary passes vectorIndexPlane.test.js 22/22 on Node 22.23.1.

Refs #2574, #2430, #2489.

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

    Fields

    Priority

    P2

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions