Parent
#328. Follow-up to #229.
Problem
The #229 fix serializes writes with a per-document lock and waits until the save commits (hocuspocusApply.ts withDocumentLock). The lock lives in one process. Production runs two hocuspocus-server replicas behind HOCUSPOCUS_INTERNAL_URL (docker-compose.prod.yml), so two parallel writes to one cold document can reach two appliers with two locks. The clean result in #229 was measured on one process only. Writes in sequence are safe, because a cold 200 waits for its row.
What to do
Measure before changing anything. Run two collab processes on two ports, the way #226 tested two replicas. Send five parallel edit_blocks calls to one section of a cold document with the same rev, split across both processes. Then read the document.
Acceptance
Out of scope
Any change to the lock before the measurement.
Parent
#328. Follow-up to #229.
Problem
The #229 fix serializes writes with a per-document lock and waits until the save commits (
hocuspocusApply.tswithDocumentLock). The lock lives in one process. Production runs twohocuspocus-serverreplicas behindHOCUSPOCUS_INTERNAL_URL(docker-compose.prod.yml), so two parallel writes to one cold document can reach two appliers with two locks. The clean result in #229 was measured on one process only. Writes in sequence are safe, because a cold200waits for its row.What to do
Measure before changing anything. Run two collab processes on two ports, the way #226 tested two replicas. Send five parallel
edit_blockscalls to one section of a cold document with the samerev, split across both processes. Then read the document.Acceptance
Out of scope
Any change to the lock before the measurement.