Closed adamreichold closed 8 months ago
Yes, EBR cell does work in a similar way, but it uses a generational garbage collection, so there can be issues if you have long running read transactions.
This is otherwise amazing, I didn't know about arc swap. Thank you!
The read side basically needs an updatable
Arc
and there is a crate for that,arc-swap
. And since we still have mutual exclusion for the write side, we do not even need a compare-and-swap/read-copy-update loop in the commit operation.This is basically a continuation of #111 trying to lighten the read side further by avoiding mutual exclusion entirely. Furthermore, I noticed that I did not apply the same treatment to the publicly accessible
CowCell
which this PR also does. Finally, I think the fact thatEbrCell
basically already works like this internally lends some credibility to the approach.