as it also serves as part of interface of get_subtree_resource_status(),
not only its internals. to ease adding the type annotations, this class
is promoted out of the class.
Signed-off-by: Kefu Chai <kchai@redhat.com>
* implement std::counting_semaphore in C++17
* use the homebrew counting_semaphore as the synchronization primitive
to access the pending tasks, for better performance than the
implementation using mutex and condition_variable.
Signed-off-by: Kefu Chai <kchai@redhat.com>
In C++ `std::moving` a `const`-qualified value yields a constant
r-value reference (`const T&&`) which won't be matched with a callable
taking non-constant r-value reference (like move constructors) but
can play with one taking a constant l-value reference (like copy
constructors do). This behaviour is surprising especially in lambas
where adding or removing the `mutable` specifier may lead to different
behaviour. The problem isn't obvious and it's easy to wrongly drop
the `mutable` druing a clean-up. Therefore introducing a tool for
developers to fail at compile-time if that happens seems desired.
Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
This PR improves the section "Monitoring the Upgrade"
in the "Upgrading Ceph" chapter of the cephadm documentation.
This PR introduces a couple of section breaks with signposting
information in their titles, and rewrites some sentences in order
to reduce the cognitive load of the reader.
Signed-off-by: Zac Dover <zac.dover@gmail.com>
common/options: convert a millisecs opt to a chrono::milliseconds and cleanups
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Reviewed-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
since ObjectStore returns a map<...,less<>> already, there is not point to
convert the returned map to the type expected by AlienStore.
Signed-off-by: Kefu Chai <kchai@redhat.com>
for two reasons:
- better performance when looking on in the return map if the key
is not a string, as we don't need to create a temporary string
as the key
- improve the performance of crimson::AlienStore, as the latter
uses the transparent comparator. as, without this change, we'd
have to perform a deep copy to fill up the returned map with
its non-transparent-comparator version.
Signed-off-by: Kefu Chai <kchai@redhat.com>
each sharded queue has multiple producers and a single consumer queue,
but the producer side is in seastar world, so ideally, we should not
guard the queue using a POSIX lock.
in this change, the lockfree multiple-writer/multiple-reader queue is
used to replace the std::queue to drop the lock guarding it.
Signed-off-by: Kefu Chai <kchai@redhat.com>
since the encoding schemes of boost::optional and std::optional are
identical, they can be used interchangeably.
Signed-off-by: Kefu Chai <kchai@redhat.com>
we should use standard library for more well defined behavior, and
less dependencies on 3rd party libraries.
Signed-off-by: Kefu Chai <kchai@redhat.com>
we should use standard library for more well defined behavior, and
less dependencies on 3rd party libraries.
Signed-off-by: Kefu Chai <kchai@redhat.com>
* no need to create a temporary string for using strtoull()
* use std::from_chars() so it's consistent with its counterpart in
in crimson.
Signed-off-by: Kefu Chai <kchai@redhat.com>
has_pg_op is always false, since m->ops is empty at that time.
so pgnls operation will go to process_op and report unknown operations.
move m->finish_decode ahead to fill m->ops.
Signed-off-by: chunmei-liu <chunmei.liu@intel.com>
it's a regression introduced by the restrcuture of the test suites,
let's pin the test to CentOS8.
See-also: https://tracker.ceph.com/issues/49638
Signed-off-by: Kefu Chai <kchai@redhat.com>