mirror of
https://github.com/XRPLF/rippled.git
synced 2026-09-27 15:28:03 +00:00
The default partition count was the host's core count, and TaggedCache::sweep() starts one thread per partition, so a sweep created as many threads as the host has cores. Fix the default at 2, exposed as the kDefaultPartitions constant. Both arms of the constructor's initializer are now non-zero, so the non-zero assertion can no longer fire and is removed. The header no longer needs <thread> or instrumentation.h. Add a GTest suite covering the default, the zero fallback, an explicit count, and the key split across partitions.