comdb2
comdb2 copied to clipboard
Change nodeix-indexed arrays into hash-tables
Change arrays which are sized by MAXNODES to hash-tables so that the nodeix value isn't forced to be less than MAXNODES. This is a slightly revised take on https://github.com/bloomberg/comdb2/pull/3764 - the main difference is that it macro-izes the retrieve functions.
/runtests
/plugin-branch tohash_plugins
This degrades performance significantly- I don't think we can merge this
The transchunk_manyins test takes double the amount of time under this branch. During the course of this test, each replicant accesses the seqnum-hash 1.2 million times, while the leader accesses the coherent-state hash more than 400k times. Next highest are waitlist_counter and the udp-counters on the leader, all over 100k accesses.
I will continue to brainstorm with the team, but I don't think we can merge this as it is now.
Keeping lockless thread-local cache in front of each hash reduces the performance hit to about 7%