next.js
a7d3aeca - Turbopack: avoid race condition when updating cells (#84598)

Commit
84 days ago
Turbopack: avoid race condition when updating cells (#84598) ### What? The update cell operation has a race condition. There is a time between changing the value and invalidating the dependent tasks. That sounds fine as tasks are eventually invalidated. But it's not due to recomputing tasks. Tasks are considered as "recomputing" when they are not flagged as dirty while they update a cell/output. A recomputing tasks will not invalidate dependent tasks as a recomputation is considered as deterministic and must yield the same results. The race happens when a recomputation of a dependent task happens while a cell is updated. During that time the cell value is already updated, but the dependent task is not marked as dirty. So the recomputing tasks incorrectly doesn't trigger an invalidation for its cell change later, which depends on the already modified data
Author
Parents
Loading