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>
This PR improves the section "Canceling an Upgrade"
in the "Upgrading Ceph" chapter of the cephadm
documentation.
I removed an extraneous prompt and rewrote a sentence
so that it was congruent with other sentences in similar
places elsewhere in the documentation.
Signed-off-by: Zac Dover <zac.dover@gmail.com>
During PG merge the MGR was observed repeatedly sending identical
set pgp_num_actual values, leading to osdmap churn at 2000/hr.
Skip the redundant osd set pgp_num_actual command if the
pgp_num is already our computed next.
Fixes: https://tracker.ceph.com/issues/51433
Signed-off-by: Dan van der Ster <daniel.vanderster@cern.ch>
Adds a mutex to SeastoreCollection which ensures that transactions are
ordered on a per-collection basis. Future optimizations could enable
the transaction construction phase to be pipelined for a single collection,
but would require correctly handling the case where a more recently
submitted transaction encounters a conflict.
Fixes: https://tracker.ceph.com/issues/51358
Signed-off-by: Samuel Just <sjust@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>
To convert namoseconds to seconds, the precision needs to be 10,
and the precision of double is 15, which is enough to use.
On aarch64, double division uses the div instruction, while long
double uses the gcc buildin _divtf3, which has poor performance.
Therefore, use double instead of long double for better performance.
Signed-off-by: Chunsong Feng <fengchunsong@huawei.com>