Commit Graph

10 Commits

Author SHA1 Message Date
Adam C. Emerson
a7676dcd10 osd: Update HitSet to work without using namespace
Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
2019-03-29 10:30:34 -04:00
Kefu Chai
f14f913fbf osd/HitSet: mark copy ctor of HitSet::Params noexcept
to be returned using seastar::future<...> the value type should satisfy
std::is_nothrow_constructible<T>.

with this change, pg_pool_t will be nothrow_constructible. and hence
can be returned using seastar::future<pg_pool_t>. otherwise
std::is_nothrow_constructible<pg_pool_t>::value would be false.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-01-29 20:04:53 +08:00
Kefu Chai
f146c6c514 core: use const_iterator for decode
Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-05-17 13:56:49 +08:00
Adam C. Emerson
46de629c3d osd: Use unqualified encode/decode
This is a portion of Part 1 of the namespace project: using ADL
properly in encode and decode so we can use namespaces easily in Ceph.

Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
2018-01-10 14:03:35 -05:00
Michal Jarzabek
1502c32f71 osd/HitSet: remove unneeded #include - Formatter
Signed-off-by: Michal Jarzabek <stiopa@gmail.com>
2016-05-17 18:01:26 +01:00
Samuel Just
8e5a801b43 osd/: assert in HitSet constructor if type is TYPE_NONE as well
Otherwise impl is unpopulated and we risk segfaults in several
methods.  It also seems like it would always indicate a bug.

Signed-off-by: Samuel Just <sjust@redhat.com>
2015-09-22 17:39:31 -07:00
Sage Weil
3ea9230a74 osd/HitSet: fix sealed initialization in Params ctor
Signed-off-by: Sage Weil <sage@inktank.com>
2013-12-06 14:37:30 -08:00
Sage Weil
a72094d504 osd/HitSet: take Params as const ref to avoid confusion about ownership
Signed-off-by: Sage Weil <sage@inktank.com>
2013-12-06 14:37:29 -08:00
Sage Weil
41e0f97005 osd/HitSet: make pg_pool_t and Params operator<< less parenthetical
pool 0 'data' rep size 2 min_size 1 crush_ruleset 0 object_hash rjenkins pg_num 8 pgp_num 8 last_change 8 owner 0 crash_replay_interval 45 hit_set bloom{false_positive_probability: 0, target size: 0, seed: 0} 10s x8

Signed-off-by: Sage Weil <sage@inktank.com>
2013-12-06 14:37:28 -08:00
Sage Weil
c01b183da0 osd_types: add generic HitSet type with bloom and explicit implementations
Track a set of hash values, either explicitly or using a bloom_filter. Hide
the implementation and allow us to transparently encode and decode.

Signed-off-by: Sage Weil <sage@inktank.com>
Signed-off-by: Greg Farnum <greg@inktank.com>
2013-12-06 14:37:26 -08:00