Even more scalable ETS ordered_set with write_concurrency #1997
#1952 introduced actual scalable
The implementation did however use a fallback method for functions like
Here are some benchmarks showing all access patterns now perform well, including those containing "selectAll" and "partial_select1000".
The text was updated successfully, but these errors were encountered:
Once an iteration key has been found, never fall back to first/last key in next/prev tree as trees may split or join under our feet. I.e we must always use previous key when searching for the next key.
It's possible to first find an empty base node and then retry and find the same base node as invalid. It's a benign race with join which first makes the old invalid 'neighbor' accessible from 'gparent' before replacing it with 'new_neighbor'.
Easier to read and debug, and about the same lines of code.
The original implementation did not do this due to fear of bad performance. But we think the negative effect of "leaking" empty base nodes is more important to fix. To get the bad performance a special kind of access patterns is needed where base nodes are frequently emptied and then repopulated soon again. ets_SUITE:throughput_benchmark for example did not show any negative effect from this commit at all.