bool HashIndex::must_split(const subdir_info_s &info) {
return (info.hash_level < (unsigned)MAX_HASH_LEVEL &&
- info.objs > ((unsigned)merge_threshold * 32));
+ info.objs > ((unsigned)merge_threshold * 16 * split_multiplier));
}
/**
* Merges occur when the number of object drops below
* merge_threshold and splits occur when the number of objects
- * exceeds 16 * merge_threshold * split_threshold.
+ * exceeds 16 * merge_threshold * split_multiplier.
*/
int merge_threshold;
- int split_threshold;
+ int split_multiplier;
/// Encodes current subdir state for determining when to split/merge.
struct subdir_info_s {
HashIndex(
const char *base_path, ///< [in] Path to the index root.
int merge_at, ///< [in] Merge threshhold.
- int split_at, ///< [in] Split threshhold.
+ int split_multiple, ///< [in] Split threshhold.
uint32_t index_version)///< [in] Index version
: LFNIndex(base_path, index_version), merge_threshold(merge_at),
- split_threshold(split_at) {}
+ split_multiplier(split_multiple) {}
/// @see CollectionIndex
uint32_t collection_version() { return index_version; }