mon/OSDMonitor: non-zero default bloom fpp

Signed-off-by: Sage Weil <sage@inktank.com>
This commit is contained in:
Sage Weil 2013-12-04 14:41:04 -08:00
parent 41e0f97005
commit 68c44cbbdc
2 changed files with 6 additions and 3 deletions

View File

@ -80,6 +80,7 @@ public:
target_element_count_(predicted_inserted_element_count),
random_seed_((random_seed) ? random_seed : 0xA5A5A5A5)
{
assert(false_positive_probability > 0.0);
find_optimal_parameters(predicted_inserted_element_count, false_positive_probability,
&salt_count_, &table_size_);
init();

View File

@ -2841,9 +2841,11 @@ int OSDMonitor::prepare_command_pool_set(map<string,cmd_vartype> &cmdmap,
} else if (var == "hit_set_type") {
if (val == "none")
p.hit_set_params = HitSet::Params();
else if (val == "bloom")
p.hit_set_params = HitSet::Params(new BloomHitSet::Params);
else if (val == "explicit_hash")
else if (val == "bloom") {
BloomHitSet::Params *bsp = new BloomHitSet::Params;
bsp->false_positive = .01;
p.hit_set_params = HitSet::Params(bsp);
} else if (val == "explicit_hash")
p.hit_set_params = HitSet::Params(new ExplicitHashHitSet::Params);
else if (val == "explicit_object")
p.hit_set_params = HitSet::Params(new ExplicitObjectHitSet::Params);