Commit ca05883
committed
fix(crdt): resolve yjs save_doc transaction deadlock
save_doc opened a read transaction (doc.transact()) and then called
doc.get_or_insert_text("t"), which opens a mutable transaction internally.
yrs transactions are mutually exclusive, so the mutable transact blocked on
the still-held read transaction and never returned: the Part 5 awareness test
(awareness_traffic_does_not_persist_to_yjs_node) hung at 0% CPU. Resolve the
text root type before opening the read transaction.
Verified green: rustyred-core 105 + rustyred-server 175 = 280 passed, 0 failed.1 parent 78bb318 commit ca05883
1 file changed
Lines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
172 | 172 | | |
173 | 173 | | |
174 | 174 | | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
175 | 180 | | |
176 | 181 | | |
177 | | - | |
| 182 | + | |
178 | 183 | | |
179 | 184 | | |
180 | 185 | | |
| |||
0 commit comments