]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon/OSDMonitor: non-zero default bloom fpp
authorSage Weil <sage@inktank.com>
Wed, 4 Dec 2013 22:41:04 +0000 (14:41 -0800)
committerSage Weil <sage@inktank.com>
Fri, 6 Dec 2013 22:37:28 +0000 (14:37 -0800)
Signed-off-by: Sage Weil <sage@inktank.com>
src/common/bloom_filter.hpp
src/mon/OSDMonitor.cc

index 34e559f21990195db0e432d200664339f4531b77..36b8ede631a25933b3340e8cd411f68cf4e482dd 100644 (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();
index 43d3acffc5aab6d1f5dc4d01825f68b4f7cb6e0e..bbd8cf0f80596eda887934c1ba3f44c17089523a 100644 (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);