Skip to content

Merge workbench settings patches under a row lock - #519

Merged
TheGreatAxios merged 2 commits into
mainfrom
cl-7251-workbench-settings-patch-route-still-whole-blob-writes
Aug 31, 2026
Merged

TheGreatAxios merged 2 commits into
mainfrom
cl-7251-workbench-settings-patch-route-still-whole-blob-writes

Conversation

@TheGreatAxios

Copy link
Copy Markdown
Contributor

Workbench settings PATCH used to merge onto a snapshot taken at the start of the request and then whole-blob-write it. A PATCH that only set chat/pinned could revert a concurrent invite that had updated chat/participants.

patchWorkbenchSettings now takes a SELECT ... FOR UPDATE lock on the workbench_settings row and merges only the keys in the patch. The PATCH handler calls that instead of snapshot-merge + updateWorkbenchSettings. Participants are still normalized in the route before the write.

Closes CL-7251

@TheGreatAxios
TheGreatAxios force-pushed the cl-7251-workbench-settings-patch-route-still-whole-blob-writes branch from 49298af to a697078 Compare August 30, 2026 21:44
@TheGreatAxios
TheGreatAxios force-pushed the cl-7251-workbench-settings-patch-route-still-whole-blob-writes branch 2 times, most recently from e8b089a to f11f9d2 Compare August 30, 2026 23:36
A PATCH that only touches chat/pinned must keep a concurrent chat/participants write. Cover the in-memory store, the HTTP route, and the drizzle row lock.
The PATCH handler no longer whole-blob-writes a pre-request snapshot. patchWorkbenchSettings SELECT ... FOR UPDATE the workbench_settings row and merges only the keys the caller sent, so a pinned-flag write cannot revert a concurrent invite.
@TheGreatAxios
TheGreatAxios force-pushed the cl-7251-workbench-settings-patch-route-still-whole-blob-writes branch from f11f9d2 to 7a61fe1 Compare August 31, 2026 01:35
@TheGreatAxios
TheGreatAxios merged commit 478d766 into main Aug 31, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant