0
Fork 0
mirror of https://github.com/mastra-ai/mastra.git synced 2026-11-17 08:44:46 +00:00

perf(pg): read only the guarded step and its predecessor under the run lock

Guarded storage v2 appends materialized the whole run while holding the row
lock, so sequential runs grew quadratically under the lock. The guard now reads
just the guarded step and its predecessor, and loads the full run only to
report a completed conflict. Sequential 64 steps: 593ms to 400ms; 128 steps:
1670ms to 1153ms.

Co-Authored-By: mastracode <284800079+mastra-platform[bot]@users.noreply.github.com>
This commit is contained in:
Tony Kovanen 2026-11-09 18:14:09 +01:00
commit 4136e11803