Status: IN
Participants lock at key granularity during `prepare()`; a second transaction touching a locked key receives a `"no"` vote and aborts rather than waiting or queuing
Source: entries/2026/05/29/two-phase-commit-test_2pc.md
self.locks = {} # key -> tx_id
for op in operations:
key = op["key"]
if key in self.locks and self.locks[key] != tx_id:
return {"vote": "no", "reason": f"key locked by {self.locks[key]}"}