|
SWC-DB
v0.5.12 C++ documentations
SWC-DB© (Super Wide Column Database) - High Performance Scalable Database (https://github.com/kashirin-alex/swc-db)
|
Go to the documentation of this file.
7 #ifndef swcdb_ranger_db_CommitLog_h
8 #define swcdb_ranger_db_CommitLog_h
15 namespace SWC {
namespace Ranger {
namespace CommitLog {
62 size_t* offset_itp,
size_t* offsetp) {
95 void expand(DB::Cells::Interval& intval);
100 Vec& frags, uint8_t vol);
106 void remove(
int &err,
Vec& fragments_old);
124 size_t size() noexcept;
134 void print(std::ostream& out,
bool minimal);
144 void _remove(
int &err,
Vec& fragments_old, Core::Semaphore* semp);
159 size_t _narrow(const DB::Cell::Key& key) const;
169 std::condition_variable_any
m_cv;
181 #include "swcdb/ranger/db/CommitLogCompact.h"
183 #endif // swcdb_ranger_db_CommitLog_h
size_t _narrow(const DB::Cell::Key &key) const
void load_cells(BlockLoader *loader, bool &is_final, Vec &frags, uint8_t vol)
Fragment::Ptr take_ownership(int &err, Fragment::Ptr &frag)
Core::Vector< Vec > CompactGroups
Fragments(const DB::Types::KeySeq key_seq)
void _load_cells(BlockLoader *loader, Vec &frags, uint8_t &vol)
std::shared_mutex m_mutex
Core::StateRunning m_commit
std::shared_mutex m_mutex_cells
void print(std::ostream &out, bool minimal)
bool processing() noexcept
Core::AtomicBool stopping
bool _processing() const noexcept
bool _need_roll() const noexcept
void expand(DB::Cells::Interval &intval)
size_t _need_compact(CompactGroups &groups, const Vec &without, size_t vol)
size_t _commit(bool finalize)
std::shared_ptr< Range > RangePtr
The SWC-DB C++ namespace 'SWC'.
size_t size_bytes(bool only_loaded=false)
Core::Atomic< size_t > m_releasable_bytes
Fragments(const Fragments &&)=delete
void finish_compact(const Compact *compact)
void _remove(int &err, Vec &fragments_old, Core::Semaphore *semp)
void add_raw(const Cell &cell, bool finalized)
Fragments & operator=(const Fragments &)=delete
Core::Vector< Fragment::Ptr > Vec
Core::Atomic< size_t > m_modification_ts
Fragments(const Fragments &)=delete
SWC_CAN_INLINE int64_t modification_ts() const noexcept
size_t size_bytes_encoded()
constexpr SWC_CAN_INLINE T load() const noexcept
void add(const DB::Cells::Cell &cell)
bool _need_compact_major()
void expand_and_align(DB::Cells::Interval &intval)
size_t need_compact(CompactGroups &groups, const Vec &without, size_t vol)
std::string get_log_fragment(const int64_t frag) const
DB::Cells::MutableVec m_cells
std::condition_variable_any m_cv
bool try_compact(uint32_t tnum=1)
SWC_CAN_INLINE void check_sequence(const char *msg, bool w_assert=true) const
void init(const RangePtr &for_range)
bool is_compacting() const
size_t cells_count(bool only_current=false)
size_t _size_bytes(bool only_loaded=false)
Core::AtomicBool m_compacting
SWC_CAN_INLINE std::shared_mutex & cells_mutex() noexcept
SWC_CAN_INLINE void _add(const DB::Cells::Cell &cell, size_t *offset_itp, size_t *offsetp)
size_t release(size_t bytes)
AtomicBase< bool > AtomicBool
SWC_CAN_INLINE void check_sequence(const char *msg, bool w_assert=true)