Remove date-oriented trim/list functionality from MDLOG, DataLog, and
Sync-Error-Log.
Don't provide start/end markers. Support only a start marker for list
and an end marker for trim.
Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
Rewrite around the asynchronous ASIO-based RADOS interface, and
include support for calls from multiple threads.
`allocate_unique` pattern contributed by
Casey Bodley <cbodley@redhat.com>
Co-authored-by: Casey Bodley <cbodley@redhat.com>
Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
This is an implementation of fifo queue over rados. Data is appended
to rados object until it's full. At that point data will be written to
a new object. Data is read from the tail sequentially (can be iterated
using marker). Data can be trimmed (up to and including marker).
Queue has a header object (meta), and zero or more data objects (parts).
The software has two layers: the higher level client operations side
that deals with the application apis, and manages the meta and parts,
and there’s the objclass level that deals with the rados layout of
meta and part objects. There are different objclass methods that deal
with reading and modifying each of these entities.
A single part has max possible size, however, it may become full once
a certain smaller size is reached (full_size_threshold). It is
imperative that once a part has reached its capacity, it will not
allow any more writes into it. For this reason, it is important that
data being written to the queue does not exceed max_entry_size . This
is enforced, by the higher level client api.
Written entries go to the current head object, and when it’s full, a
new head part is created. When listing entries, data is iterated from
tail to the current head. Trim can either change the pointer within
the current tail object, and if needed it removes tail objects.
A unitest has been created to test functionality.
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
Squashed-by: Adam C. Emerson <aemerson@redhat.com>
Having Thread::create store a pointer to a string that is passed to
ceph_pthread_setname in Thread::entry_wrapper can lead to using a
pointer in the calling thread's stack that gets freed before use.
Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
Support using a librados::AioCompletion as a completion handler in
Boost.Asio when the arguments are void or only an error code.
(To support more arguments we'd have to wrap up the AioCompletion with
pointers to hold them.)
Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
adds an allocator-aware version of std::make_unique(). this is similar to
std::allocate_shared(), though it's slightly less convenient because,
unlike std::shared_ptr<T>, the Deleter has to be specified as a template
parameter in std::unique_ptr<T, Deleter>
Signed-off-by: Casey Bodley <cbodley@redhat.com>
Bind an allocator to a completion, analogously to
boost::async::bind_executor.
Based on bind_executor.hpp which is copyright 2003-2019
Christopher M. Kohlhoff <chris@kohlhoff.com> and under
the Boost Software License, Version 1.0
Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
mgr/mgr_module : Fix keyerror for op if rule steps first element is opcode
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
rpm,deb: drop /etc/sudoers.d/cephadm
Reviewed-by: Sebastian Wagner <sebastian.wagner@suse.com>
Reviewed-by: David Disseldorp <ddiss@suse.de>
Reviewed-by: Kefu Chai <kchai@redhat.com>
Libzbc maintainers recommend switching to libzbd, which is lighter and supports
both ZNS SSDs and HM-SMR HDDs.
Signed-off-by: Abutalib Aghayev <agayev@cs.cmu.edu>
* add an abstract class of `PGCommand` for `ceph tell <pgid> <command>`
* add two sample implementations for the pg tell commands.
- "query"
- "mark_unfound_lost"
Signed-off-by: Kefu Chai <kchai@redhat.com>
type_map is the item(bucket & device) type id and its type name.
name_map is the item(bucket & device) id and its name.
Signed-off-by: Changcheng Liu <changcheng.liu@aliyun.com>