mirror of
https://github.com/neondatabase/neon.git
synced 2026-01-14 17:02:56 +00:00
The long-term plan is to make LayerMap an immutable data structure that is multi-versioned. Meaning, we will not modify LayerMap in place but create a (cheap) copy and modify that copy. Once we're done making modifications, we make the copy available to readers through the SeqWait. The modifications will be made by a _single_ task, the pageserver actor. But _many_ readers can wait_for & use same or multiple versions of the LayerMap. So, there's a new method `split_spmc` that splits up a `SeqWait` into a not-clonable producer (Advance) and a clonable consumer (Wait). (SeqWait itself is mpmc, but, for the actor architecture, it makes sense to enforce spmc in the type system) # Please enter the commit message for your changes. Lines starting