retain traverses all values in the hashmap which is slow: https://github.com/solana-labs/solana/blob/88f22c360/core/src/cluster_slots.rs#L45 btree-map instead allows more efficient prunning there. In addition there is potential race condition here: https://github.com/solana-labs/solana/blob/88f22c360/core/src/cluster_slots.rs#L68-L74 If another thread inserts a value at the same slot key between the read and write lock, current thread will discard the inserted value. |
||
---|---|---|
.. | ||
benches | ||
src | ||
tests | ||
.gitignore | ||
Cargo.toml | ||
build.rs |