#include <swcdb/db/client/Query/Update/Committer.h>
Public Types | |
typedef std::shared_ptr< Committer > | Ptr |
Public Member Functions | |
Committer (const DB::Types::Range type, const cid_t cid, Handlers::Base::Column *colp, const DB::Cell::Key::Ptr &key_start, const Handlers::Base::Ptr &hdlr, const ReqBase::Ptr &parent=nullptr, const rid_t rid=0) noexcept | |
Committer (const DB::Types::Range type, const cid_t cid, Handlers::Base::Column *colp, const DB::Cell::Key::Ptr &key_start, const Handlers::Base::Ptr &hdlr, const ReqBase::Ptr &parent, const rid_t rid, const DB::Cell::Key &key_finish) | |
~Committer () noexcept | |
SWC_CAN_INLINE bool | valid () noexcept |
SWC_CAN_INLINE Clients::Ptr & | get_clients () noexcept |
SWC_CAN_INLINE Profiling & | get_profile () noexcept |
void | print (std::ostream &out) |
void | locate_on_manager () |
Static Public Member Functions | |
static SWC_CAN_INLINE void | execute (const Handlers::Base::Ptr &hdlr, Handlers::Base::Column *colp) |
Public Attributes | |
const DB::Types::Range | type |
const cid_t | master_cid |
Core::CompletionCounter< uint32_t > | workload |
const cid_t | cid |
Handlers::Base::Column * | colp |
DB::Cell::Key::Ptr | key_start |
Handlers::Base::Ptr | hdlr |
ReqBase::Ptr | parent |
const rid_t | rid |
const DB::Cell::Key | key_finish |
Private Member Functions | |
void | located_on_manager (const ReqBase::Ptr &base, Comm::Protocol::Mngr::Params::RgrGetRsp &rsp) |
void | locate_on_ranger (Comm::EndPoints &&endpoints, int64_t revision=0) |
void | located_on_ranger (const Comm::EndPoints &endpoints, const ReqBase::Ptr &base, const Comm::Protocol::Rgr::Params::RangeLocateRsp &rsp) |
void | resolve_on_manager () |
void | located_ranger (const ReqBase::Ptr &base, Comm::Protocol::Mngr::Params::RgrGetRsp &rsp) |
void | proceed_on_ranger (const ReqBase::Ptr &base, Comm::Protocol::Mngr::Params::RgrGetRsp &rsp) |
void | commit_data (const Comm::EndPoints &endpoints, const ReqBase::Ptr &base) |
void | committed_data (const DynamicBuffer &cells_buff, const ReqBase::Ptr &base, const ReqBase::Ptr &req, const Comm::Protocol::Rgr::Params::RangeQueryUpdateRsp &rsp) |
Definition at line 25 of file Committer.h.
typedef std::shared_ptr<Committer> SWC::client::Query::Update::Committer::Ptr |
Definition at line 38 of file Committer.h.
|
noexcept |
Definition at line 30 of file Committer.cc.
Referenced by committed_data(), execute(), locate_on_manager(), located_on_manager(), located_on_ranger(), and proceed_on_ranger().
SWC::client::Query::Update::Committer::Committer | ( | const DB::Types::Range | type, |
const cid_t | cid, | ||
Handlers::Base::Column * | colp, | ||
const DB::Cell::Key::Ptr & | key_start, | ||
const Handlers::Base::Ptr & | hdlr, | ||
const ReqBase::Ptr & | parent, | ||
const rid_t | rid, | ||
const DB::Cell::Key & | key_finish | ||
) |
Definition at line 45 of file Committer.cc.
|
noexcept |
Definition at line 61 of file Committer.cc.
|
private |
Definition at line 469 of file Committer.cc.
References SWC::client::Query::Profiling::Component::Start::add(), colp, SWC::Comm::Protocol::Rgr::Params::RangeQueryUpdateRsp::err, SWC::Core::BufferDyn< BufferT >::fill(), SWC::client::Query::Update::Handlers::Base::Column::get_buff(), SWC::client::Query::Update::Handlers::Base::Column::get_cid(), hdlr, SWC::Core::CompletionCounter< CountT >::increment(), SWC::Core::CompletionCounter< CountT >::is_last(), key_finish, key_start, SWC::Comm::Protocol::Rgr::Req::RangeQueryUpdate< DataT >::request(), rid, SWC_CAN_INLINE, and workload.
Referenced by proceed_on_ranger().
|
private |
Definition at line 529 of file Committer.cc.
References SWC::client::Query::Update::Handlers::Base::Column::add(), SWC::Comm::Protocol::Rgr::Params::RangeQueryUpdateRsp::cells_added, colp, Committer(), SWC::Comm::Protocol::Rgr::Params::RangeQueryUpdateRsp::err, SWC::client::Query::Update::Handlers::Base::Column::get_cid(), SWC::client::Query::Update::Handlers::Base::Column::get_key_next(), hdlr, SWC::Core::CompletionCounter< CountT >::is_last(), SWC::Error::OK, SWC::Error::RANGE_BAD_CELLS_INPUT, SWC::Error::RANGE_BAD_INTERVAL, SWC::Comm::Protocol::Rgr::Params::RangeQueryUpdateRsp::range_end, SWC::Comm::Protocol::Rgr::Params::RangeQueryUpdateRsp::range_prev_end, SWC::Error::REQUEST_TIMEOUT, SWC_UPDATER_LOCATOR_RSP_DEBUG, and workload.
|
inlinestatic |
Definition at line 29 of file Committer.h.
References colp, Committer(), SWC::client::Query::Update::Handlers::Base::Column::get_cid(), SWC::client::Query::Update::Handlers::Base::Column::get_first_key(), and hdlr.
Referenced by SWC::client::Query::Update::Handlers::Base::default_executor().
|
inlinenoexcept |
Definition at line 75 of file Committer.h.
References hdlr.
|
inlinenoexcept |
Definition at line 80 of file Committer.h.
References hdlr.
void SWC::client::Query::Update::Committer::locate_on_manager | ( | ) |
Definition at line 92 of file Committer.cc.
References SWC::client::Query::Profiling::Component::Start::add(), SWC::client::Query::Profiling::Component::Start::add_cached(), cid, colp, Committer(), SWC::DB::Cell::Key::copy(), SWC::DB::Cell::Key::count, SWC::Comm::Protocol::Mngr::Params::RgrGetRsp::err, SWC::client::Query::Update::Handlers::Base::Column::get_cid(), SWC::client::Query::Update::Handlers::Base::Column::get_key_next(), SWC::DB::Types::SystemColumn::get_meta_cid_str(), SWC::client::Query::Update::Handlers::Base::Column::get_sequence(), hdlr, SWC::DB::Cell::Key::insert(), SWC::DB::Types::SystemColumn::is_data(), SWC::DB::Types::SystemColumn::is_master(), key_start, SWC::LOG_DEBUG, SWC::Comm::Protocol::Mngr::Req::RgrGet< DataT >::make(), master_cid, SWC::Error::OK, SWC::Comm::Protocol::Mngr::Params::RgrGetReq::range_begin, SWC::DB::Cell::Key::remove(), SWC::Comm::Protocol::Mngr::Params::RgrGetRsp::rid, SWC_CAN_INLINE, SWC_LOCATOR_REQ_DEBUG, SWC_LOG_OSTREAM, SWC_LOG_OUT, and SWC::Core::to_string().
|
private |
Definition at line 237 of file Committer.cc.
References SWC::client::Query::Profiling::Component::Start::add(), cid, colp, SWC::Comm::Protocol::Rgr::Params::RangeLocateReq::COMMIT, SWC::DB::Cell::Key::copy(), SWC::Comm::Protocol::Rgr::Params::RangeLocateRsp::err, SWC::Comm::Protocol::Rgr::Params::RangeLocateReq::flags, SWC::client::Query::Update::Handlers::Base::Column::get_cid(), SWC::DB::Types::SystemColumn::get_meta_cid_str(), SWC::client::Query::Update::Handlers::Base::Column::get_sequence(), SWC::Comm::Protocol::Rgr::Params::RangeLocateReq::HAVE_REVISION, hdlr, SWC::DB::Cell::Key::insert(), SWC::DB::Types::SystemColumn::is_data(), SWC::DB::Types::SystemColumn::is_master(), key_start, SWC::Comm::Protocol::Rgr::Req::RangeLocate< DataT >::make(), SWC::Comm::Protocol::Rgr::Params::RangeLocateReq::range_begin, SWC::Comm::Protocol::Rgr::Params::RangeLocateReq::revision, rid, SWC::Comm::Protocol::Rgr::Params::RangeLocateRsp::rid, SWC_CAN_INLINE, SWC_LOCATOR_REQ_DEBUG, SWC::Core::to_string(), and type.
|
private |
Definition at line 174 of file Committer.cc.
References cid, SWC::Error::CLIENT_STOPPING, colp, SWC::Error::COLUMN_NOT_EXISTS, Committer(), SWC::DB::Cell::Key::count, SWC::Comm::Protocol::Mngr::Params::RgrGetRsp::endpoints, SWC::Comm::Protocol::Mngr::Params::RgrGetRsp::err, SWC::client::Query::Update::Handlers::Base::Column::get_cid(), SWC::client::Query::Update::Handlers::Base::Column::get_key_next(), hdlr, SWC::DB::Types::SystemColumn::is_master(), key_start, master_cid, SWC::Error::OK, SWC::Comm::Protocol::Mngr::Params::RgrGetRsp::range_begin, SWC::Comm::Protocol::Mngr::Params::RgrGetRsp::range_end, SWC::DB::Cell::Key::remove(), SWC::Comm::Protocol::Mngr::Params::RgrGetRsp::revision, SWC::Comm::Protocol::Mngr::Params::RgrGetRsp::rid, and SWC_LOCATOR_RSP_DEBUG.
|
private |
Definition at line 285 of file Committer.cc.
References cid, SWC::Comm::Protocol::Rgr::Params::RangeLocateRsp::cid, colp, SWC::Error::COMM_NOT_CONNECTED, Committer(), SWC::DB::Cell::Key::empty(), SWC::Comm::Protocol::Rgr::Params::RangeLocateRsp::err, SWC::client::Query::Update::Handlers::Base::Column::get_key_next(), hdlr, key_start, SWC::DB::Types::MASTER, master_cid, SWC::Error::OK, parent, SWC::Comm::Protocol::Rgr::Params::RangeLocateRsp::range_end, SWC::Error::RANGE_NOT_FOUND, SWC::Error::REQUEST_TIMEOUT, SWC::Error::RGR_NOT_LOADED_RANGE, rid, SWC::Comm::Protocol::Rgr::Params::RangeLocateRsp::rid, SWC::Error::SERVER_SHUTTING_DOWN, SWC_LOCATOR_RSP_DEBUG, and type.
|
private |
Definition at line 382 of file Committer.cc.
References cid, SWC::Comm::Protocol::Mngr::Params::RgrGetRsp::cid, SWC::Error::CLIENT_STOPPING, colp, SWC::Error::COLUMN_NOT_EXISTS, SWC::Core::Vector< T, SizeT, GROW_SZ >::empty(), SWC::Comm::Protocol::Mngr::Params::RgrGetRsp::endpoints, SWC::Comm::Protocol::Mngr::Params::RgrGetRsp::err, SWC::client::Query::Update::Handlers::Base::Column::get_cid(), hdlr, SWC::DB::Types::SystemColumn::is_master(), SWC::Error::OK, parent, proceed_on_ranger(), SWC::Error::RANGE_NOT_FOUND, SWC::Comm::Protocol::Mngr::Params::RgrGetRsp::rid, and SWC_LOCATOR_RSP_DEBUG.
void SWC::client::Query::Update::Committer::print | ( | std::ostream & | out | ) |
Definition at line 63 of file Committer.cc.
References cid, colp, hdlr, key_finish, key_start, SWC::DB::Cell::Key::print(), SWC::client::Query::Update::Handlers::Base::Column::print(), rid, SWC::DB::Types::to_string(), and type.
|
private |
Definition at line 422 of file Committer.cc.
References cid, SWC::Comm::Protocol::Mngr::Params::RgrGetRsp::cid, colp, commit_data(), Committer(), SWC::Comm::Protocol::Mngr::Params::RgrGetRsp::endpoints, SWC::client::Query::Update::Handlers::Base::Column::get_cid(), hdlr, SWC::DB::Types::SystemColumn::is_master(), SWC::DB::Types::SystemColumn::is_meta(), key_start, SWC::DB::Types::MASTER, parent, SWC::Comm::Protocol::Mngr::Params::RgrGetRsp::range_end, rid, SWC::Comm::Protocol::Mngr::Params::RgrGetRsp::rid, SWC_LOCATOR_RSP_DEBUG, and type.
Referenced by located_ranger(), and resolve_on_manager().
|
private |
Definition at line 344 of file Committer.cc.
References SWC::client::Query::Profiling::Component::Start::add(), cid, SWC::Core::Vector< T, SizeT, GROW_SZ >::empty(), SWC::Comm::Protocol::Mngr::Params::RgrGetRsp::endpoints, SWC::Comm::Protocol::Mngr::Params::RgrGetRsp::err, hdlr, SWC::DB::Types::SystemColumn::is_master(), SWC::Comm::Protocol::Mngr::Req::RgrGet< DataT >::make(), SWC::Error::OK, proceed_on_ranger(), rid, SWC::Comm::Protocol::Mngr::Params::RgrGetRsp::rid, SWC_CAN_INLINE, SWC_LOCATOR_REQ_DEBUG, and SWC_LOCATOR_RSP_DEBUG.
|
inlinenoexcept |
Definition at line 70 of file Committer.h.
References hdlr.
const cid_t SWC::client::Query::Update::Committer::cid |
Definition at line 42 of file Committer.h.
Referenced by locate_on_manager(), locate_on_ranger(), located_on_manager(), located_on_ranger(), located_ranger(), print(), proceed_on_ranger(), and resolve_on_manager().
Handlers::Base::Column* SWC::client::Query::Update::Committer::colp |
Definition at line 43 of file Committer.h.
Referenced by commit_data(), committed_data(), execute(), locate_on_manager(), locate_on_ranger(), located_on_manager(), located_on_ranger(), located_ranger(), print(), and proceed_on_ranger().
Handlers::Base::Ptr SWC::client::Query::Update::Committer::hdlr |
Definition at line 45 of file Committer.h.
Referenced by commit_data(), committed_data(), execute(), get_clients(), get_profile(), locate_on_manager(), locate_on_ranger(), located_on_manager(), located_on_ranger(), located_ranger(), print(), proceed_on_ranger(), resolve_on_manager(), and valid().
const DB::Cell::Key SWC::client::Query::Update::Committer::key_finish |
Definition at line 48 of file Committer.h.
Referenced by commit_data(), and print().
DB::Cell::Key::Ptr SWC::client::Query::Update::Committer::key_start |
Definition at line 44 of file Committer.h.
Referenced by commit_data(), locate_on_manager(), locate_on_ranger(), located_on_manager(), located_on_ranger(), print(), and proceed_on_ranger().
const cid_t SWC::client::Query::Update::Committer::master_cid |
Definition at line 40 of file Committer.h.
Referenced by locate_on_manager(), located_on_manager(), and located_on_ranger().
ReqBase::Ptr SWC::client::Query::Update::Committer::parent |
Definition at line 46 of file Committer.h.
Referenced by located_on_ranger(), located_ranger(), and proceed_on_ranger().
const rid_t SWC::client::Query::Update::Committer::rid |
Definition at line 47 of file Committer.h.
Referenced by commit_data(), locate_on_ranger(), located_on_ranger(), print(), proceed_on_ranger(), and resolve_on_manager().
const DB::Types::Range SWC::client::Query::Update::Committer::type |
Definition at line 39 of file Committer.h.
Referenced by locate_on_ranger(), located_on_ranger(), print(), and proceed_on_ranger().
Core::CompletionCounter<uint32_t> SWC::client::Query::Update::Committer::workload |
Definition at line 41 of file Committer.h.
Referenced by commit_data(), and committed_data().