Skip to content

Store on SQLite follow-ups: sorted lists in SQL, multi-process, backup CLI, recipe targets, throughput #859

Closed

Description

@jimhoyd

Follow-ups found while moving the store onto SQLite (#858, the first slice of #835). All were observed in the implementation and none has been measured yet.

  1. Sorted and filtered lists are ordered in JS, not SQL. They read the id plus the named fields, order with the existing runList semantics, and then fetch the page. Moving the ordering into SQL needs care: SQLite's BINARY collation orders by UTF-8, while the documented order is UTF-16.
  2. Only one serving process per database, and it isn't enforced. Nothing refuses a second server now that .store.lock is gone. The audit drain also wakes only in the process that wrote the event. If enforcement is ever wanted, PRAGMA locking_mode=EXCLUSIVE would do it, at the cost of online backups and live operator CLI runs.
  3. No store backup CLI. The docs point at SQLite's backup API, and only node:sqlite backup() is tested.
  4. The store-crud recipe claims aws/vercel: conditional. Core's preflight derives that without seeing the store's targets: ['node'], but the store refuses both targets at activation.
  5. Throughput is unmeasured. Each commit runs synchronous=FULL and fsyncs on the event loop, and no benchmark has been run.

The next #835 slice (result-aware idempotency replay and conditional multi-record transitions) stays in #835.

Activity

  1. jimhoyd commented on Sep 29, 2026

    @jimhoyd
    CollaboratorAuthor

    Owner decision (2026-09-29): make the store's SQLite synchronous level operator-configurable per site (host option, never project YAML). The default stays FULL, and the trade-off is documented from the #882 measurements.

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