in `SQLiteDB::InitPrepareParams()`, `DBOpInfo::query_str` is assigned to
`DBOpPrepareInfo::query_str`:
p_params.op.query_str = params->op.query_str;
by making `DBOpPrepareInfo::query_str` a view, we avoid allocating a
copy of the `std::string`
Signed-off-by: Casey Bodley <cbodley@redhat.com>
all string constants passed to sqlite3_bind_parameter_index() are now
`static constexpr const char*` instead of `std::string`
Signed-off-by: Casey Bodley <cbodley@redhat.com>
mgr/dashboard: dashboard turns telemetry off when configuring report
Reviewed-by: Nizamudeen A <nia@redhat.com>
Reviewed-by: Alfonso Martínez <almartin@redhat.com>
Reviewed-by: Yaarit Hatuka <yaarit@redhat.com>
Reviewed-by: Laura Flores <lflores@redhat.com>
Complete on_finish right away only if the replayer is stopped (meaning
that it is legible to be restarted immediately, possibly from on_finish
itself). This is the behaviour pretty much anyone would assume and
also what ImageReplayer::restart() relies on.
Fixes: https://tracker.ceph.com/issues/54344
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Somewhat similar to commit 0a3794e562 ("rbd-mirror: make stop
properly cancel restart"), make it so that a) if a manual stop is
joined to regular stop, the stop becomes manual and b) if a regular
stop is joined to a manual stop, the stop stays manual.
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
- don't default on_finish parameter
- m_restart_requested is set in ImageReplayer::restart() which is the
only restart=true call site, so setting m_restart_requested here is
redundant
- is_stopped_() can't be true in is_running_() branch
- on_finish->complete(0) in the end is unreachable
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Mostly for paddr_t and journal_seq_t, and use P_ADDR_NULL and
JOURNAL_SEQ_NULL where possible, with related cleanups.
Signed-off-by: Yingxin Cheng <yingxin.cheng@intel.com>
After start_dedup() is called on the object,
several CREATE_OR_GET_REFs are sent.
In the meantime, the ObjectContextRef can be evicted
from the cache while the deduplication is in progress.
To avoid this situation, this commit adds ObjectContextRef
to ManifestOp as FlushOp works.
Signed-off-by: Myoungwon Oh <myoungwon.oh@samsung.com>
A subsequent PR will introduce a CircularBoundedJournal implementation
for fast nvme devices.
SegmentCleaner no longer needs a reference to Journal, so dispense with
the set_segment_provider machinery and simply pass it in the
constructor.
Move responsibility for finding the journal segments into the journal
itself. This does mean that we check the segment headers on the journal
device twice, but that should be a neglible amount of overhead on mount.
SegmentCleaner::init_segments no longer needs to return Journal
segments, so merge with mount().
Signed-off-by: Myoungwon Oh <myoungwon.oh@samsung.com>
Signed-off-by: Samuel Just <sjust@redhat.com>
The compression code depends on headers generated during the build
of the common code for Ceph.
Ensure that CMake understands this dependency, avoiding a race
between generation of header files in common and compilation of the
compression module.
Signed-off-by: James Page <james.page@ubuntu.com>
When a PoolReplayer detects remote pool metadata change it
sets "stopping" flag expecting the Mirror will restart it.
Although setting "stopping" flag makes the PoolReplayer::run
thread to terminate, the thread's is_started function will still
return true until join is called (and reset the thread id).
This made impossible for the Mirror to detect (by calling
PoolReplayer::is_running) that the PoolReplayer needed restart.
Fixes: https://tracker.ceph.com/issues/54258
Signed-off-by: Mykola Golub <mgolub@suse.com>
otherwise we'd have FTBFS like
/usr/include/fmt/core.h:1727:3: error: static_assert failed due to requirement 'formattable' "Cannot format an argument. To make type T formattable provide a formatter<T> specialization: https://fmt.dev/latest/api$
static_assert(
^
/usr/include/fmt/core.h:1853:23: note: in instantiation of function template specialization 'fmt::detail::make_arg<true, fmt::basic_format_context<fmt::appender, char>, fmt::detail::type::custom_type, crimson::os:$
data_{detail::make_arg<
please note, delta_op_t is lifted out of the templated outer class
to avoid the headache of specialization of template of template in
another namespace.
Signed-off-by: Kefu Chai <tchaikov@gmail.com>
A new job that doesn't want ms_mode to be set underneath it is about to
be added. Rename rxbounce to ms_modeless to make this purpose obvious.
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
A minimal change extracted from PR#44050, to facilitate
backporting.
The multitudes of bogus events generated fill up the logs.
Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
works around a compilation failure in c++20 (with gcc 11.2 and boost
1.76) when choosing between two overloads of
`boost::beast::tcp_stream::async_connect()`
`get_callback_adapter()` returns a variadic lambda that matches the
concept for both overloads (`completion_token_for<ConnectHandler>`
and `completion_token_for<RangeConnectHandler>`), but compilation of
the wrapped lambda fails for the `ConnectHandler` overload because it
expects two arguments instead of one
instead of using `get_callback_adapter()` to convert the first argument
from `boost::system::error_code` to `int` for the wrapped lambda, do
this in the lambda itself
Fixes: https://tracker.ceph.com/issues/54303
Signed-off-by: Casey Bodley <cbodley@redhat.com>