mirror of
https://github.com/matrix-construct/construct
synced 2024-11-17 23:40:57 +01:00
ircd::db: Plan on not sending any exceptions through RocksDB...
This commit is contained in:
parent
d436861aed
commit
c9b89ec6ef
8 changed files with 214 additions and 135 deletions
|
@ -35,11 +35,11 @@ struct ircd::db::database::comparator final
|
||||||
database *d;
|
database *d;
|
||||||
db::comparator user;
|
db::comparator user;
|
||||||
|
|
||||||
void FindShortestSeparator(std::string *start, const Slice &limit) const override;
|
void FindShortestSeparator(std::string *start, const Slice &limit) const noexcept override;
|
||||||
void FindShortSuccessor(std::string *key) const override;
|
void FindShortSuccessor(std::string *key) const noexcept override;
|
||||||
int Compare(const Slice &a, const Slice &b) const override;
|
int Compare(const Slice &a, const Slice &b) const noexcept override;
|
||||||
bool Equal(const Slice &a, const Slice &b) const override;
|
bool Equal(const Slice &a, const Slice &b) const noexcept override;
|
||||||
const char *Name() const override;
|
const char *Name() const noexcept override;
|
||||||
|
|
||||||
comparator(database *const &d, db::comparator user)
|
comparator(database *const &d, db::comparator user)
|
||||||
:d{d}
|
:d{d}
|
||||||
|
|
|
@ -57,45 +57,45 @@ struct ircd::db::database::env final
|
||||||
*rocksdb::Env::Default()
|
*rocksdb::Env::Default()
|
||||||
};
|
};
|
||||||
|
|
||||||
Status NewSequentialFile(const std::string& f, std::unique_ptr<SequentialFile>* r, const EnvOptions& options) override;
|
Status NewSequentialFile(const std::string& f, std::unique_ptr<SequentialFile>* r, const EnvOptions& options) noexcept override;
|
||||||
Status NewRandomAccessFile(const std::string& f, std::unique_ptr<RandomAccessFile>* r, const EnvOptions& options) override;
|
Status NewRandomAccessFile(const std::string& f, std::unique_ptr<RandomAccessFile>* r, const EnvOptions& options) noexcept override;
|
||||||
Status NewWritableFile(const std::string& f, std::unique_ptr<WritableFile>* r, const EnvOptions& options) override;
|
Status NewWritableFile(const std::string& f, std::unique_ptr<WritableFile>* r, const EnvOptions& options) noexcept override;
|
||||||
Status ReopenWritableFile(const std::string& fname, std::unique_ptr<WritableFile>* result, const EnvOptions& options) override;
|
Status ReopenWritableFile(const std::string& fname, std::unique_ptr<WritableFile>* result, const EnvOptions& options) noexcept override;
|
||||||
Status ReuseWritableFile(const std::string& fname, const std::string& old_fname, std::unique_ptr<WritableFile>* r, const EnvOptions& options) override;
|
Status ReuseWritableFile(const std::string& fname, const std::string& old_fname, std::unique_ptr<WritableFile>* r, const EnvOptions& options) noexcept override;
|
||||||
Status NewRandomRWFile(const std::string& fname, std::unique_ptr<RandomRWFile>* result, const EnvOptions& options) override;
|
Status NewRandomRWFile(const std::string& fname, std::unique_ptr<RandomRWFile>* result, const EnvOptions& options) noexcept override;
|
||||||
Status NewDirectory(const std::string& name, std::unique_ptr<Directory>* result) override;
|
Status NewDirectory(const std::string& name, std::unique_ptr<Directory>* result) noexcept override;
|
||||||
Status FileExists(const std::string& f) override;
|
Status FileExists(const std::string& f) noexcept override;
|
||||||
Status GetChildren(const std::string& dir, std::vector<std::string>* r) override;
|
Status GetChildren(const std::string& dir, std::vector<std::string>* r) noexcept override;
|
||||||
Status GetChildrenFileAttributes(const std::string& dir, std::vector<FileAttributes>* result) override;
|
Status GetChildrenFileAttributes(const std::string& dir, std::vector<FileAttributes>* result) noexcept override;
|
||||||
Status DeleteFile(const std::string& f) override;
|
Status DeleteFile(const std::string& f) noexcept override;
|
||||||
Status CreateDir(const std::string& d) override;
|
Status CreateDir(const std::string& d) noexcept override;
|
||||||
Status CreateDirIfMissing(const std::string& d) override;
|
Status CreateDirIfMissing(const std::string& d) noexcept override;
|
||||||
Status DeleteDir(const std::string& d) override;
|
Status DeleteDir(const std::string& d) noexcept override;
|
||||||
Status GetFileSize(const std::string& f, uint64_t* s) override;
|
Status GetFileSize(const std::string& f, uint64_t* s) noexcept override;
|
||||||
Status GetFileModificationTime(const std::string& fname, uint64_t* file_mtime) override;
|
Status GetFileModificationTime(const std::string& fname, uint64_t* file_mtime) noexcept override;
|
||||||
Status RenameFile(const std::string& s, const std::string& t) override;
|
Status RenameFile(const std::string& s, const std::string& t) noexcept override;
|
||||||
Status LinkFile(const std::string& s, const std::string& t) override;
|
Status LinkFile(const std::string& s, const std::string& t) noexcept override;
|
||||||
Status LockFile(const std::string& f, FileLock** l) override;
|
Status LockFile(const std::string& f, FileLock** l) noexcept override;
|
||||||
Status UnlockFile(FileLock* l) override;
|
Status UnlockFile(FileLock* l) noexcept override;
|
||||||
void Schedule(void (*f)(void* arg), void* a, Priority pri, void* tag = nullptr, void (*u)(void* arg) = 0) override;
|
void Schedule(void (*f)(void* arg), void* a, Priority pri, void* tag = nullptr, void (*u)(void* arg) = 0) noexcept override;
|
||||||
int UnSchedule(void* tag, Priority pri) override;
|
int UnSchedule(void* tag, Priority pri) noexcept override;
|
||||||
void StartThread(void (*f)(void*), void* a) override;
|
void StartThread(void (*f)(void*), void* a) noexcept override;
|
||||||
void WaitForJoin() override;
|
void WaitForJoin() noexcept override;
|
||||||
unsigned int GetThreadPoolQueueLen(Priority pri = LOW) const override;
|
unsigned int GetThreadPoolQueueLen(Priority pri = LOW) const noexcept override;
|
||||||
Status GetTestDirectory(std::string* path) override;
|
Status GetTestDirectory(std::string* path) noexcept override;
|
||||||
Status NewLogger(const std::string& fname, std::shared_ptr<Logger>* result) override;
|
Status NewLogger(const std::string& fname, std::shared_ptr<Logger>* result) noexcept override;
|
||||||
uint64_t NowMicros() override;
|
uint64_t NowMicros() noexcept override;
|
||||||
void SleepForMicroseconds(int micros) override;
|
void SleepForMicroseconds(int micros) noexcept override;
|
||||||
Status GetHostName(char* name, uint64_t len) override;
|
Status GetHostName(char* name, uint64_t len) noexcept override;
|
||||||
Status GetCurrentTime(int64_t* unix_time) override;
|
Status GetCurrentTime(int64_t* unix_time) noexcept override;
|
||||||
Status GetAbsolutePath(const std::string& db_path, std::string* output_path) override;
|
Status GetAbsolutePath(const std::string& db_path, std::string* output_path) noexcept override;
|
||||||
void SetBackgroundThreads(int num, Priority pri) override;
|
void SetBackgroundThreads(int num, Priority pri) noexcept override;
|
||||||
void IncBackgroundThreadsIfNeeded(int num, Priority pri) override;
|
void IncBackgroundThreadsIfNeeded(int num, Priority pri) noexcept override;
|
||||||
void LowerThreadPoolIOPriority(Priority pool = LOW) override;
|
void LowerThreadPoolIOPriority(Priority pool = LOW) noexcept override;
|
||||||
std::string TimeToString(uint64_t time) override;
|
std::string TimeToString(uint64_t time) noexcept override;
|
||||||
Status GetThreadList(std::vector<ThreadStatus>* thread_list) override;
|
Status GetThreadList(std::vector<ThreadStatus>* thread_list) noexcept override;
|
||||||
ThreadStatusUpdater* GetThreadStatusUpdater() const override;
|
ThreadStatusUpdater* GetThreadStatusUpdater() const noexcept override;
|
||||||
uint64_t GetThreadID() const override;
|
uint64_t GetThreadID() const noexcept override;
|
||||||
|
|
||||||
env(database *const &d);
|
env(database *const &d);
|
||||||
~env() noexcept;
|
~env() noexcept;
|
||||||
|
@ -111,24 +111,24 @@ struct ircd::db::database::env::writable_file final
|
||||||
database &d;
|
database &d;
|
||||||
std::unique_ptr<rocksdb::WritableFile> defaults;
|
std::unique_ptr<rocksdb::WritableFile> defaults;
|
||||||
|
|
||||||
Status Append(const Slice& data) override;
|
Status Append(const Slice& data) noexcept override;
|
||||||
Status PositionedAppend(const Slice& data, uint64_t offset) override;
|
Status PositionedAppend(const Slice& data, uint64_t offset) noexcept override;
|
||||||
Status Truncate(uint64_t size) override;
|
Status Truncate(uint64_t size) noexcept override;
|
||||||
Status Close() override;
|
Status Close() noexcept override;
|
||||||
Status Flush() override;
|
Status Flush() noexcept override;
|
||||||
Status Sync() override;
|
Status Sync() noexcept override;
|
||||||
Status Fsync() override;
|
Status Fsync() noexcept override;
|
||||||
bool IsSyncThreadSafe() const override;
|
bool IsSyncThreadSafe() const noexcept override;
|
||||||
void SetIOPriority(IOPriority pri) override;
|
void SetIOPriority(IOPriority pri) noexcept override;
|
||||||
IOPriority GetIOPriority() override;
|
IOPriority GetIOPriority() noexcept override;
|
||||||
uint64_t GetFileSize() override;
|
uint64_t GetFileSize() noexcept override;
|
||||||
void GetPreallocationStatus(size_t* block_size, size_t* last_allocated_block) override;
|
void GetPreallocationStatus(size_t* block_size, size_t* last_allocated_block) noexcept override;
|
||||||
size_t GetUniqueId(char* id, size_t max_size) const override;
|
size_t GetUniqueId(char* id, size_t max_size) const noexcept override;
|
||||||
Status InvalidateCache(size_t offset, size_t length) override;
|
Status InvalidateCache(size_t offset, size_t length) noexcept override;
|
||||||
void SetPreallocationBlockSize(size_t size) override;
|
void SetPreallocationBlockSize(size_t size) noexcept override;
|
||||||
void PrepareWrite(size_t offset, size_t len) override;
|
void PrepareWrite(size_t offset, size_t len) noexcept override;
|
||||||
Status Allocate(uint64_t offset, uint64_t len) override;
|
Status Allocate(uint64_t offset, uint64_t len) noexcept override;
|
||||||
Status RangeSync(uint64_t offset, uint64_t nbytes) override;
|
Status RangeSync(uint64_t offset, uint64_t nbytes) noexcept override;
|
||||||
|
|
||||||
writable_file(database *const &d, const std::string &name, const EnvOptions &, std::unique_ptr<WritableFile> defaults);
|
writable_file(database *const &d, const std::string &name, const EnvOptions &, std::unique_ptr<WritableFile> defaults);
|
||||||
~writable_file() noexcept;
|
~writable_file() noexcept;
|
||||||
|
@ -143,12 +143,12 @@ struct ircd::db::database::env::sequential_file final
|
||||||
database &d;
|
database &d;
|
||||||
std::unique_ptr<SequentialFile> defaults;
|
std::unique_ptr<SequentialFile> defaults;
|
||||||
|
|
||||||
bool use_direct_io() const override;
|
bool use_direct_io() const noexcept override;
|
||||||
size_t GetRequiredBufferAlignment() const override;
|
size_t GetRequiredBufferAlignment() const noexcept override;
|
||||||
Status InvalidateCache(size_t offset, size_t length) override;
|
Status InvalidateCache(size_t offset, size_t length) noexcept override;
|
||||||
Status PositionedRead(uint64_t offset, size_t n, Slice *result, char *scratch) override;
|
Status PositionedRead(uint64_t offset, size_t n, Slice *result, char *scratch) noexcept override;
|
||||||
Status Read(size_t n, Slice *result, char *scratch) override;
|
Status Read(size_t n, Slice *result, char *scratch) noexcept override;
|
||||||
Status Skip(uint64_t size) override;
|
Status Skip(uint64_t size) noexcept override;
|
||||||
|
|
||||||
sequential_file(database *const &d, const std::string &name, const EnvOptions &, std::unique_ptr<SequentialFile> defaults);
|
sequential_file(database *const &d, const std::string &name, const EnvOptions &, std::unique_ptr<SequentialFile> defaults);
|
||||||
~sequential_file() noexcept;
|
~sequential_file() noexcept;
|
||||||
|
@ -163,13 +163,13 @@ struct ircd::db::database::env::random_access_file final
|
||||||
database &d;
|
database &d;
|
||||||
std::unique_ptr<RandomAccessFile> defaults;
|
std::unique_ptr<RandomAccessFile> defaults;
|
||||||
|
|
||||||
bool use_direct_io() const override;
|
bool use_direct_io() const noexcept override;
|
||||||
size_t GetRequiredBufferAlignment() const override;
|
size_t GetRequiredBufferAlignment() const noexcept override;
|
||||||
size_t GetUniqueId(char* id, size_t max_size) const override;
|
size_t GetUniqueId(char* id, size_t max_size) const noexcept override;
|
||||||
void Hint(AccessPattern pattern) override;
|
void Hint(AccessPattern pattern) noexcept override;
|
||||||
Status InvalidateCache(size_t offset, size_t length) override;
|
Status InvalidateCache(size_t offset, size_t length) noexcept override;
|
||||||
Status Read(uint64_t offset, size_t n, Slice *result, char *scratch) const override;
|
Status Read(uint64_t offset, size_t n, Slice *result, char *scratch) const noexcept override;
|
||||||
Status Prefetch(uint64_t offset, size_t n) override;
|
Status Prefetch(uint64_t offset, size_t n) noexcept override;
|
||||||
|
|
||||||
random_access_file(database *const &d, const std::string &name, const EnvOptions &, std::unique_ptr<RandomAccessFile> defaults);
|
random_access_file(database *const &d, const std::string &name, const EnvOptions &, std::unique_ptr<RandomAccessFile> defaults);
|
||||||
~random_access_file() noexcept;
|
~random_access_file() noexcept;
|
||||||
|
@ -184,14 +184,14 @@ struct ircd::db::database::env::random_rw_file final
|
||||||
database &d;
|
database &d;
|
||||||
std::unique_ptr<RandomRWFile> defaults;
|
std::unique_ptr<RandomRWFile> defaults;
|
||||||
|
|
||||||
bool use_direct_io() const override;
|
bool use_direct_io() const noexcept override;
|
||||||
size_t GetRequiredBufferAlignment() const override;
|
size_t GetRequiredBufferAlignment() const noexcept override;
|
||||||
Status Read(uint64_t offset, size_t n, Slice *result, char *scratch) const override;
|
Status Read(uint64_t offset, size_t n, Slice *result, char *scratch) const noexcept override;
|
||||||
Status Write(uint64_t offset, const Slice &data) override;
|
Status Write(uint64_t offset, const Slice &data) noexcept override;
|
||||||
Status Flush() override;
|
Status Flush() noexcept override;
|
||||||
Status Sync() override;
|
Status Sync() noexcept override;
|
||||||
Status Fsync() override;
|
Status Fsync() noexcept override;
|
||||||
Status Close() override;
|
Status Close() noexcept override;
|
||||||
|
|
||||||
random_rw_file(database *const &d, const std::string &name, const EnvOptions &, std::unique_ptr<RandomRWFile> defaults);
|
random_rw_file(database *const &d, const std::string &name, const EnvOptions &, std::unique_ptr<RandomRWFile> defaults);
|
||||||
~random_rw_file() noexcept;
|
~random_rw_file() noexcept;
|
||||||
|
@ -205,7 +205,7 @@ struct ircd::db::database::env::directory final
|
||||||
database &d;
|
database &d;
|
||||||
std::unique_ptr<Directory> defaults;
|
std::unique_ptr<Directory> defaults;
|
||||||
|
|
||||||
Status Fsync() override;
|
Status Fsync() noexcept override;
|
||||||
|
|
||||||
directory(database *const &d, const std::string &name, std::unique_ptr<Directory> defaults);
|
directory(database *const &d, const std::string &name, std::unique_ptr<Directory> defaults);
|
||||||
~directory() noexcept;
|
~directory() noexcept;
|
||||||
|
|
|
@ -33,13 +33,13 @@ struct ircd::db::database::events final
|
||||||
{
|
{
|
||||||
database *d;
|
database *d;
|
||||||
|
|
||||||
void OnFlushCompleted(rocksdb::DB *, const rocksdb::FlushJobInfo &) override;
|
void OnFlushCompleted(rocksdb::DB *, const rocksdb::FlushJobInfo &) noexcept override;
|
||||||
void OnCompactionCompleted(rocksdb::DB *, const rocksdb::CompactionJobInfo &) override;
|
void OnCompactionCompleted(rocksdb::DB *, const rocksdb::CompactionJobInfo &) noexcept override;
|
||||||
void OnTableFileDeleted(const rocksdb::TableFileDeletionInfo &) override;
|
void OnTableFileDeleted(const rocksdb::TableFileDeletionInfo &) noexcept override;
|
||||||
void OnTableFileCreated(const rocksdb::TableFileCreationInfo &) override;
|
void OnTableFileCreated(const rocksdb::TableFileCreationInfo &) noexcept override;
|
||||||
void OnTableFileCreationStarted(const rocksdb::TableFileCreationBriefInfo &) override;
|
void OnTableFileCreationStarted(const rocksdb::TableFileCreationBriefInfo &) noexcept override;
|
||||||
void OnMemTableSealed(const rocksdb::MemTableInfo &) override;
|
void OnMemTableSealed(const rocksdb::MemTableInfo &) noexcept override;
|
||||||
void OnColumnFamilyHandleDeletionStarted(rocksdb::ColumnFamilyHandle *) override;
|
void OnColumnFamilyHandleDeletionStarted(rocksdb::ColumnFamilyHandle *) noexcept override;
|
||||||
|
|
||||||
events(database *const &d)
|
events(database *const &d)
|
||||||
:d{d}
|
:d{d}
|
||||||
|
|
|
@ -34,9 +34,9 @@ struct ircd::db::database::logs final
|
||||||
database *d;
|
database *d;
|
||||||
|
|
||||||
// Logger
|
// Logger
|
||||||
void Logv(const rocksdb::InfoLogLevel level, const char *fmt, va_list ap) override;
|
void Logv(const rocksdb::InfoLogLevel level, const char *fmt, va_list ap) noexcept override;
|
||||||
void Logv(const char *fmt, va_list ap) override;
|
void Logv(const char *fmt, va_list ap) noexcept override;
|
||||||
void LogHeader(const char *fmt, va_list ap) override;
|
void LogHeader(const char *fmt, va_list ap) noexcept override;
|
||||||
|
|
||||||
logs(database *const &d)
|
logs(database *const &d)
|
||||||
:d{d}
|
:d{d}
|
||||||
|
|
|
@ -34,8 +34,8 @@ struct ircd::db::database::mergeop final
|
||||||
database *d;
|
database *d;
|
||||||
merge_closure merger;
|
merge_closure merger;
|
||||||
|
|
||||||
bool Merge(const rocksdb::Slice &, const rocksdb::Slice *, const rocksdb::Slice &, std::string *, rocksdb::Logger *) const override;
|
bool Merge(const rocksdb::Slice &, const rocksdb::Slice *, const rocksdb::Slice &, std::string *, rocksdb::Logger *) const noexcept override;
|
||||||
const char *Name() const override;
|
const char *Name() const noexcept override;
|
||||||
|
|
||||||
mergeop(database *const &d, merge_closure merger = nullptr)
|
mergeop(database *const &d, merge_closure merger = nullptr)
|
||||||
:d{d}
|
:d{d}
|
||||||
|
|
|
@ -35,10 +35,10 @@ struct ircd::db::database::prefix_transform final
|
||||||
database *d;
|
database *d;
|
||||||
db::prefix_transform user;
|
db::prefix_transform user;
|
||||||
|
|
||||||
const char *Name() const override;
|
const char *Name() const noexcept override;
|
||||||
bool InDomain(const Slice &key) const override;
|
bool InDomain(const Slice &key) const noexcept override;
|
||||||
bool InRange(const Slice &key) const override;
|
bool InRange(const Slice &key) const noexcept override;
|
||||||
Slice Transform(const Slice &key) const override;
|
Slice Transform(const Slice &key) const noexcept override;
|
||||||
|
|
||||||
prefix_transform(database *const &d, db::prefix_transform user)
|
prefix_transform(database *const &d, db::prefix_transform user)
|
||||||
:d{d}
|
:d{d}
|
||||||
|
|
|
@ -35,13 +35,13 @@ struct ircd::db::database::stats final
|
||||||
std::array<uint64_t, rocksdb::TICKER_ENUM_MAX> ticker {{0}};
|
std::array<uint64_t, rocksdb::TICKER_ENUM_MAX> ticker {{0}};
|
||||||
std::array<rocksdb::HistogramData, rocksdb::HISTOGRAM_ENUM_MAX> histogram;
|
std::array<rocksdb::HistogramData, rocksdb::HISTOGRAM_ENUM_MAX> histogram;
|
||||||
|
|
||||||
uint64_t getTickerCount(const uint32_t tickerType) const override;
|
uint64_t getTickerCount(const uint32_t tickerType) const noexcept override;
|
||||||
void recordTick(const uint32_t tickerType, const uint64_t count) override;
|
void recordTick(const uint32_t tickerType, const uint64_t count) noexcept override;
|
||||||
void setTickerCount(const uint32_t tickerType, const uint64_t count) override;
|
void setTickerCount(const uint32_t tickerType, const uint64_t count) noexcept override;
|
||||||
void histogramData(const uint32_t type, rocksdb::HistogramData *) const override;
|
void histogramData(const uint32_t type, rocksdb::HistogramData *) const noexcept override;
|
||||||
void measureTime(const uint32_t histogramType, const uint64_t time) override;
|
void measureTime(const uint32_t histogramType, const uint64_t time) noexcept override;
|
||||||
bool HistEnabledForType(const uint32_t type) const override;
|
bool HistEnabledForType(const uint32_t type) const noexcept override;
|
||||||
uint64_t getAndResetTickerCount(const uint32_t tickerType) override;
|
uint64_t getAndResetTickerCount(const uint32_t tickerType) noexcept override;
|
||||||
|
|
||||||
stats(database *const &d)
|
stats(database *const &d)
|
||||||
:d{d}
|
:d{d}
|
||||||
|
|
135
ircd/db.cc
135
ircd/db.cc
|
@ -612,7 +612,7 @@ ircd::db::database::get(const column &column)
|
||||||
|
|
||||||
const char *
|
const char *
|
||||||
ircd::db::database::comparator::Name()
|
ircd::db::database::comparator::Name()
|
||||||
const
|
const noexcept
|
||||||
{
|
{
|
||||||
assert(!user.name.empty());
|
assert(!user.name.empty());
|
||||||
return user.name.data();
|
return user.name.data();
|
||||||
|
@ -621,7 +621,7 @@ const
|
||||||
bool
|
bool
|
||||||
ircd::db::database::comparator::Equal(const Slice &a,
|
ircd::db::database::comparator::Equal(const Slice &a,
|
||||||
const Slice &b)
|
const Slice &b)
|
||||||
const
|
const noexcept
|
||||||
{
|
{
|
||||||
assert(bool(user.equal));
|
assert(bool(user.equal));
|
||||||
return user.equal(slice(a), slice(b));
|
return user.equal(slice(a), slice(b));
|
||||||
|
@ -630,7 +630,7 @@ const
|
||||||
int
|
int
|
||||||
ircd::db::database::comparator::Compare(const Slice &a,
|
ircd::db::database::comparator::Compare(const Slice &a,
|
||||||
const Slice &b)
|
const Slice &b)
|
||||||
const
|
const noexcept
|
||||||
{
|
{
|
||||||
assert(bool(user.less));
|
assert(bool(user.less));
|
||||||
const auto sa{slice(a)};
|
const auto sa{slice(a)};
|
||||||
|
@ -644,14 +644,14 @@ const
|
||||||
|
|
||||||
void
|
void
|
||||||
ircd::db::database::comparator::FindShortSuccessor(std::string *key)
|
ircd::db::database::comparator::FindShortSuccessor(std::string *key)
|
||||||
const
|
const noexcept
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ircd::db::database::comparator::FindShortestSeparator(std::string *key,
|
ircd::db::database::comparator::FindShortestSeparator(std::string *key,
|
||||||
const Slice &_limit)
|
const Slice &_limit)
|
||||||
const
|
const noexcept
|
||||||
{
|
{
|
||||||
const string_view limit{_limit.data(), _limit.size()};
|
const string_view limit{_limit.data(), _limit.size()};
|
||||||
}
|
}
|
||||||
|
@ -663,7 +663,7 @@ const
|
||||||
|
|
||||||
const char *
|
const char *
|
||||||
ircd::db::database::prefix_transform::Name()
|
ircd::db::database::prefix_transform::Name()
|
||||||
const
|
const noexcept
|
||||||
{
|
{
|
||||||
assert(!user.name.empty());
|
assert(!user.name.empty());
|
||||||
return user.name.c_str();
|
return user.name.c_str();
|
||||||
|
@ -671,7 +671,7 @@ const
|
||||||
|
|
||||||
rocksdb::Slice
|
rocksdb::Slice
|
||||||
ircd::db::database::prefix_transform::Transform(const Slice &key)
|
ircd::db::database::prefix_transform::Transform(const Slice &key)
|
||||||
const
|
const noexcept
|
||||||
{
|
{
|
||||||
assert(bool(user.get));
|
assert(bool(user.get));
|
||||||
return slice(user.get(slice(key)));
|
return slice(user.get(slice(key)));
|
||||||
|
@ -679,14 +679,14 @@ const
|
||||||
|
|
||||||
bool
|
bool
|
||||||
ircd::db::database::prefix_transform::InRange(const Slice &key)
|
ircd::db::database::prefix_transform::InRange(const Slice &key)
|
||||||
const
|
const noexcept
|
||||||
{
|
{
|
||||||
return InDomain(key);
|
return InDomain(key);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
ircd::db::database::prefix_transform::InDomain(const Slice &key)
|
ircd::db::database::prefix_transform::InDomain(const Slice &key)
|
||||||
const
|
const noexcept
|
||||||
{
|
{
|
||||||
assert(bool(user.has));
|
assert(bool(user.has));
|
||||||
return user.has(slice(key));
|
return user.has(slice(key));
|
||||||
|
@ -915,6 +915,7 @@ translate(const rocksdb::InfoLogLevel &level)
|
||||||
void
|
void
|
||||||
ircd::db::database::logs::Logv(const char *const fmt,
|
ircd::db::database::logs::Logv(const char *const fmt,
|
||||||
va_list ap)
|
va_list ap)
|
||||||
|
noexcept
|
||||||
{
|
{
|
||||||
Logv(rocksdb::InfoLogLevel::DEBUG_LEVEL, fmt, ap);
|
Logv(rocksdb::InfoLogLevel::DEBUG_LEVEL, fmt, ap);
|
||||||
}
|
}
|
||||||
|
@ -922,6 +923,7 @@ ircd::db::database::logs::Logv(const char *const fmt,
|
||||||
void
|
void
|
||||||
ircd::db::database::logs::LogHeader(const char *const fmt,
|
ircd::db::database::logs::LogHeader(const char *const fmt,
|
||||||
va_list ap)
|
va_list ap)
|
||||||
|
noexcept
|
||||||
{
|
{
|
||||||
Logv(rocksdb::InfoLogLevel::DEBUG_LEVEL, fmt, ap);
|
Logv(rocksdb::InfoLogLevel::DEBUG_LEVEL, fmt, ap);
|
||||||
}
|
}
|
||||||
|
@ -932,6 +934,7 @@ void
|
||||||
ircd::db::database::logs::Logv(const rocksdb::InfoLogLevel level,
|
ircd::db::database::logs::Logv(const rocksdb::InfoLogLevel level,
|
||||||
const char *const fmt,
|
const char *const fmt,
|
||||||
va_list ap)
|
va_list ap)
|
||||||
|
noexcept
|
||||||
{
|
{
|
||||||
if(level < GetInfoLogLevel())
|
if(level < GetInfoLogLevel())
|
||||||
return;
|
return;
|
||||||
|
@ -962,7 +965,7 @@ ircd::db::database::logs::Logv(const rocksdb::InfoLogLevel level,
|
||||||
|
|
||||||
const char *
|
const char *
|
||||||
ircd::db::database::mergeop::Name()
|
ircd::db::database::mergeop::Name()
|
||||||
const
|
const noexcept
|
||||||
{
|
{
|
||||||
return "<unnamed>";
|
return "<unnamed>";
|
||||||
}
|
}
|
||||||
|
@ -973,7 +976,7 @@ ircd::db::database::mergeop::Merge(const rocksdb::Slice &_key,
|
||||||
const rocksdb::Slice &_update,
|
const rocksdb::Slice &_update,
|
||||||
std::string *const newval,
|
std::string *const newval,
|
||||||
rocksdb::Logger *const)
|
rocksdb::Logger *const)
|
||||||
const try
|
const noexcept try
|
||||||
{
|
{
|
||||||
const string_view key
|
const string_view key
|
||||||
{
|
{
|
||||||
|
@ -1025,6 +1028,7 @@ ircd::db::log_rdb_perf_context(const bool &all)
|
||||||
|
|
||||||
uint64_t
|
uint64_t
|
||||||
ircd::db::database::stats::getAndResetTickerCount(const uint32_t type)
|
ircd::db::database::stats::getAndResetTickerCount(const uint32_t type)
|
||||||
|
noexcept
|
||||||
{
|
{
|
||||||
const auto ret(getTickerCount(type));
|
const auto ret(getTickerCount(type));
|
||||||
setTickerCount(type, 0);
|
setTickerCount(type, 0);
|
||||||
|
@ -1033,7 +1037,7 @@ ircd::db::database::stats::getAndResetTickerCount(const uint32_t type)
|
||||||
|
|
||||||
bool
|
bool
|
||||||
ircd::db::database::stats::HistEnabledForType(const uint32_t type)
|
ircd::db::database::stats::HistEnabledForType(const uint32_t type)
|
||||||
const
|
const noexcept
|
||||||
{
|
{
|
||||||
return type < histogram.size();
|
return type < histogram.size();
|
||||||
}
|
}
|
||||||
|
@ -1041,13 +1045,14 @@ const
|
||||||
void
|
void
|
||||||
ircd::db::database::stats::measureTime(const uint32_t type,
|
ircd::db::database::stats::measureTime(const uint32_t type,
|
||||||
const uint64_t time)
|
const uint64_t time)
|
||||||
|
noexcept
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ircd::db::database::stats::histogramData(const uint32_t type,
|
ircd::db::database::stats::histogramData(const uint32_t type,
|
||||||
rocksdb::HistogramData *const data)
|
rocksdb::HistogramData *const data)
|
||||||
const
|
const noexcept
|
||||||
{
|
{
|
||||||
assert(data);
|
assert(data);
|
||||||
|
|
||||||
|
@ -1061,6 +1066,7 @@ const
|
||||||
void
|
void
|
||||||
ircd::db::database::stats::recordTick(const uint32_t type,
|
ircd::db::database::stats::recordTick(const uint32_t type,
|
||||||
const uint64_t count)
|
const uint64_t count)
|
||||||
|
noexcept
|
||||||
{
|
{
|
||||||
ticker.at(type) += count;
|
ticker.at(type) += count;
|
||||||
}
|
}
|
||||||
|
@ -1068,13 +1074,14 @@ ircd::db::database::stats::recordTick(const uint32_t type,
|
||||||
void
|
void
|
||||||
ircd::db::database::stats::setTickerCount(const uint32_t type,
|
ircd::db::database::stats::setTickerCount(const uint32_t type,
|
||||||
const uint64_t count)
|
const uint64_t count)
|
||||||
|
noexcept
|
||||||
{
|
{
|
||||||
ticker.at(type) = count;
|
ticker.at(type) = count;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint64_t
|
uint64_t
|
||||||
ircd::db::database::stats::getTickerCount(const uint32_t type)
|
ircd::db::database::stats::getTickerCount(const uint32_t type)
|
||||||
const
|
const noexcept
|
||||||
{
|
{
|
||||||
return ticker.at(type);
|
return ticker.at(type);
|
||||||
}
|
}
|
||||||
|
@ -1087,6 +1094,7 @@ const
|
||||||
void
|
void
|
||||||
ircd::db::database::events::OnFlushCompleted(rocksdb::DB *const db,
|
ircd::db::database::events::OnFlushCompleted(rocksdb::DB *const db,
|
||||||
const rocksdb::FlushJobInfo &info)
|
const rocksdb::FlushJobInfo &info)
|
||||||
|
noexcept
|
||||||
{
|
{
|
||||||
rog.debug("'%s' @%p: flushed: column[%s] path[%s] tid[%lu] job[%d] writes[slow:%d stop:%d]",
|
rog.debug("'%s' @%p: flushed: column[%s] path[%s] tid[%lu] job[%d] writes[slow:%d stop:%d]",
|
||||||
d->name,
|
d->name,
|
||||||
|
@ -1102,6 +1110,7 @@ ircd::db::database::events::OnFlushCompleted(rocksdb::DB *const db,
|
||||||
void
|
void
|
||||||
ircd::db::database::events::OnCompactionCompleted(rocksdb::DB *const db,
|
ircd::db::database::events::OnCompactionCompleted(rocksdb::DB *const db,
|
||||||
const rocksdb::CompactionJobInfo &info)
|
const rocksdb::CompactionJobInfo &info)
|
||||||
|
noexcept
|
||||||
{
|
{
|
||||||
rog.debug("'%s' @%p: compacted: column[%s] status[%d] tid[%lu] job[%d]",
|
rog.debug("'%s' @%p: compacted: column[%s] status[%d] tid[%lu] job[%d]",
|
||||||
d->name,
|
d->name,
|
||||||
|
@ -1114,6 +1123,7 @@ ircd::db::database::events::OnCompactionCompleted(rocksdb::DB *const db,
|
||||||
|
|
||||||
void
|
void
|
||||||
ircd::db::database::events::OnTableFileDeleted(const rocksdb::TableFileDeletionInfo &info)
|
ircd::db::database::events::OnTableFileDeleted(const rocksdb::TableFileDeletionInfo &info)
|
||||||
|
noexcept
|
||||||
{
|
{
|
||||||
rog.debug("'%s': table file deleted: db[%s] path[%s] status[%d] job[%d]",
|
rog.debug("'%s': table file deleted: db[%s] path[%s] status[%d] job[%d]",
|
||||||
d->name,
|
d->name,
|
||||||
|
@ -1125,6 +1135,7 @@ ircd::db::database::events::OnTableFileDeleted(const rocksdb::TableFileDeletionI
|
||||||
|
|
||||||
void
|
void
|
||||||
ircd::db::database::events::OnTableFileCreated(const rocksdb::TableFileCreationInfo &info)
|
ircd::db::database::events::OnTableFileCreated(const rocksdb::TableFileCreationInfo &info)
|
||||||
|
noexcept
|
||||||
{
|
{
|
||||||
rog.debug("'%s': table file created: db[%s] path[%s] status[%d] job[%d]",
|
rog.debug("'%s': table file created: db[%s] path[%s] status[%d] job[%d]",
|
||||||
d->name,
|
d->name,
|
||||||
|
@ -1136,6 +1147,7 @@ ircd::db::database::events::OnTableFileCreated(const rocksdb::TableFileCreationI
|
||||||
|
|
||||||
void
|
void
|
||||||
ircd::db::database::events::OnTableFileCreationStarted(const rocksdb::TableFileCreationBriefInfo &info)
|
ircd::db::database::events::OnTableFileCreationStarted(const rocksdb::TableFileCreationBriefInfo &info)
|
||||||
|
noexcept
|
||||||
{
|
{
|
||||||
rog.debug("'%s': table file creating: db[%s] column[%s] path[%s] job[%d]",
|
rog.debug("'%s': table file creating: db[%s] column[%s] path[%s] job[%d]",
|
||||||
d->name,
|
d->name,
|
||||||
|
@ -1147,6 +1159,7 @@ ircd::db::database::events::OnTableFileCreationStarted(const rocksdb::TableFileC
|
||||||
|
|
||||||
void
|
void
|
||||||
ircd::db::database::events::OnMemTableSealed(const rocksdb::MemTableInfo &info)
|
ircd::db::database::events::OnMemTableSealed(const rocksdb::MemTableInfo &info)
|
||||||
|
noexcept
|
||||||
{
|
{
|
||||||
rog.debug("'%s': memory table sealed: column[%s] entries[%lu] deletes[%lu]",
|
rog.debug("'%s': memory table sealed: column[%s] entries[%lu] deletes[%lu]",
|
||||||
d->name,
|
d->name,
|
||||||
|
@ -1157,6 +1170,7 @@ ircd::db::database::events::OnMemTableSealed(const rocksdb::MemTableInfo &info)
|
||||||
|
|
||||||
void
|
void
|
||||||
ircd::db::database::events::OnColumnFamilyHandleDeletionStarted(rocksdb::ColumnFamilyHandle *const h)
|
ircd::db::database::events::OnColumnFamilyHandleDeletionStarted(rocksdb::ColumnFamilyHandle *const h)
|
||||||
|
noexcept
|
||||||
{
|
{
|
||||||
rog.debug("'%s': column[%s] handle closing @ %p",
|
rog.debug("'%s': column[%s] handle closing @ %p",
|
||||||
d->name,
|
d->name,
|
||||||
|
@ -1187,6 +1201,7 @@ rocksdb::Status
|
||||||
ircd::db::database::env::NewSequentialFile(const std::string& name,
|
ircd::db::database::env::NewSequentialFile(const std::string& name,
|
||||||
std::unique_ptr<SequentialFile>* r,
|
std::unique_ptr<SequentialFile>* r,
|
||||||
const EnvOptions& options)
|
const EnvOptions& options)
|
||||||
|
noexcept
|
||||||
{
|
{
|
||||||
log.debug("'%s': new sequential file '%s' options:%p",
|
log.debug("'%s': new sequential file '%s' options:%p",
|
||||||
d.name,
|
d.name,
|
||||||
|
@ -1207,6 +1222,7 @@ rocksdb::Status
|
||||||
ircd::db::database::env::NewRandomAccessFile(const std::string& name,
|
ircd::db::database::env::NewRandomAccessFile(const std::string& name,
|
||||||
std::unique_ptr<RandomAccessFile>* r,
|
std::unique_ptr<RandomAccessFile>* r,
|
||||||
const EnvOptions& options)
|
const EnvOptions& options)
|
||||||
|
noexcept
|
||||||
{
|
{
|
||||||
log.debug("'%s': new random access file '%s' options:%p",
|
log.debug("'%s': new random access file '%s' options:%p",
|
||||||
d.name,
|
d.name,
|
||||||
|
@ -1228,6 +1244,7 @@ rocksdb::Status
|
||||||
ircd::db::database::env::NewWritableFile(const std::string& name,
|
ircd::db::database::env::NewWritableFile(const std::string& name,
|
||||||
std::unique_ptr<WritableFile>* r,
|
std::unique_ptr<WritableFile>* r,
|
||||||
const EnvOptions& options)
|
const EnvOptions& options)
|
||||||
|
noexcept
|
||||||
{
|
{
|
||||||
log.debug("'%s': new writable file '%s' options:%p",
|
log.debug("'%s': new writable file '%s' options:%p",
|
||||||
d.name,
|
d.name,
|
||||||
|
@ -1248,6 +1265,7 @@ rocksdb::Status
|
||||||
ircd::db::database::env::NewRandomRWFile(const std::string& name,
|
ircd::db::database::env::NewRandomRWFile(const std::string& name,
|
||||||
std::unique_ptr<RandomRWFile>* result,
|
std::unique_ptr<RandomRWFile>* result,
|
||||||
const EnvOptions& options)
|
const EnvOptions& options)
|
||||||
|
noexcept
|
||||||
{
|
{
|
||||||
log.debug("'%s': new random read/write file '%s' options:%p",
|
log.debug("'%s': new random read/write file '%s' options:%p",
|
||||||
d.name,
|
d.name,
|
||||||
|
@ -1267,6 +1285,7 @@ ircd::db::database::env::NewRandomRWFile(const std::string& name,
|
||||||
rocksdb::Status
|
rocksdb::Status
|
||||||
ircd::db::database::env::NewDirectory(const std::string& name,
|
ircd::db::database::env::NewDirectory(const std::string& name,
|
||||||
std::unique_ptr<Directory>* result)
|
std::unique_ptr<Directory>* result)
|
||||||
|
noexcept
|
||||||
{
|
{
|
||||||
log.debug("'%s': new directory '%s'",
|
log.debug("'%s': new directory '%s'",
|
||||||
d.name,
|
d.name,
|
||||||
|
@ -1286,6 +1305,7 @@ rocksdb::Status
|
||||||
ircd::db::database::env::ReopenWritableFile(const std::string& name,
|
ircd::db::database::env::ReopenWritableFile(const std::string& name,
|
||||||
std::unique_ptr<WritableFile>* result,
|
std::unique_ptr<WritableFile>* result,
|
||||||
const EnvOptions& options)
|
const EnvOptions& options)
|
||||||
|
noexcept
|
||||||
{
|
{
|
||||||
log.debug("'%s': reopen writable file '%s' options:%p",
|
log.debug("'%s': reopen writable file '%s' options:%p",
|
||||||
d.name,
|
d.name,
|
||||||
|
@ -1300,6 +1320,7 @@ ircd::db::database::env::ReuseWritableFile(const std::string& name,
|
||||||
const std::string& old_name,
|
const std::string& old_name,
|
||||||
std::unique_ptr<WritableFile>* r,
|
std::unique_ptr<WritableFile>* r,
|
||||||
const EnvOptions& options)
|
const EnvOptions& options)
|
||||||
|
noexcept
|
||||||
{
|
{
|
||||||
log.debug("'%s': reuse writable file '%s' old '%s' options:%p",
|
log.debug("'%s': reuse writable file '%s' old '%s' options:%p",
|
||||||
d.name,
|
d.name,
|
||||||
|
@ -1312,6 +1333,7 @@ ircd::db::database::env::ReuseWritableFile(const std::string& name,
|
||||||
|
|
||||||
rocksdb::Status
|
rocksdb::Status
|
||||||
ircd::db::database::env::FileExists(const std::string& f)
|
ircd::db::database::env::FileExists(const std::string& f)
|
||||||
|
noexcept
|
||||||
{
|
{
|
||||||
log.debug("'%s': file exists '%s'",
|
log.debug("'%s': file exists '%s'",
|
||||||
d.name,
|
d.name,
|
||||||
|
@ -1323,6 +1345,7 @@ ircd::db::database::env::FileExists(const std::string& f)
|
||||||
rocksdb::Status
|
rocksdb::Status
|
||||||
ircd::db::database::env::GetChildren(const std::string& dir,
|
ircd::db::database::env::GetChildren(const std::string& dir,
|
||||||
std::vector<std::string>* r)
|
std::vector<std::string>* r)
|
||||||
|
noexcept
|
||||||
{
|
{
|
||||||
log.debug("'%s': get children of directory '%s'",
|
log.debug("'%s': get children of directory '%s'",
|
||||||
d.name,
|
d.name,
|
||||||
|
@ -1334,6 +1357,7 @@ ircd::db::database::env::GetChildren(const std::string& dir,
|
||||||
rocksdb::Status
|
rocksdb::Status
|
||||||
ircd::db::database::env::GetChildrenFileAttributes(const std::string& dir,
|
ircd::db::database::env::GetChildrenFileAttributes(const std::string& dir,
|
||||||
std::vector<FileAttributes>* result)
|
std::vector<FileAttributes>* result)
|
||||||
|
noexcept
|
||||||
{
|
{
|
||||||
log.debug("'%s': get children file attributes of directory '%s'",
|
log.debug("'%s': get children file attributes of directory '%s'",
|
||||||
d.name,
|
d.name,
|
||||||
|
@ -1344,6 +1368,7 @@ ircd::db::database::env::GetChildrenFileAttributes(const std::string& dir,
|
||||||
|
|
||||||
rocksdb::Status
|
rocksdb::Status
|
||||||
ircd::db::database::env::DeleteFile(const std::string& name)
|
ircd::db::database::env::DeleteFile(const std::string& name)
|
||||||
|
noexcept
|
||||||
{
|
{
|
||||||
log.debug("'%s': delete file '%s'",
|
log.debug("'%s': delete file '%s'",
|
||||||
d.name,
|
d.name,
|
||||||
|
@ -1354,6 +1379,7 @@ ircd::db::database::env::DeleteFile(const std::string& name)
|
||||||
|
|
||||||
rocksdb::Status
|
rocksdb::Status
|
||||||
ircd::db::database::env::CreateDir(const std::string& name)
|
ircd::db::database::env::CreateDir(const std::string& name)
|
||||||
|
noexcept
|
||||||
{
|
{
|
||||||
log.debug("'%s': create directory '%s'",
|
log.debug("'%s': create directory '%s'",
|
||||||
d.name,
|
d.name,
|
||||||
|
@ -1364,6 +1390,7 @@ ircd::db::database::env::CreateDir(const std::string& name)
|
||||||
|
|
||||||
rocksdb::Status
|
rocksdb::Status
|
||||||
ircd::db::database::env::CreateDirIfMissing(const std::string& name)
|
ircd::db::database::env::CreateDirIfMissing(const std::string& name)
|
||||||
|
noexcept
|
||||||
{
|
{
|
||||||
log.debug("'%s': create directory if missing '%s'",
|
log.debug("'%s': create directory if missing '%s'",
|
||||||
d.name,
|
d.name,
|
||||||
|
@ -1374,6 +1401,7 @@ ircd::db::database::env::CreateDirIfMissing(const std::string& name)
|
||||||
|
|
||||||
rocksdb::Status
|
rocksdb::Status
|
||||||
ircd::db::database::env::DeleteDir(const std::string& name)
|
ircd::db::database::env::DeleteDir(const std::string& name)
|
||||||
|
noexcept
|
||||||
{
|
{
|
||||||
log.debug("'%s': delete directory '%s'",
|
log.debug("'%s': delete directory '%s'",
|
||||||
d.name,
|
d.name,
|
||||||
|
@ -1385,6 +1413,7 @@ ircd::db::database::env::DeleteDir(const std::string& name)
|
||||||
rocksdb::Status
|
rocksdb::Status
|
||||||
ircd::db::database::env::GetFileSize(const std::string& name,
|
ircd::db::database::env::GetFileSize(const std::string& name,
|
||||||
uint64_t* s)
|
uint64_t* s)
|
||||||
|
noexcept
|
||||||
{
|
{
|
||||||
log.debug("'%s': get file size '%s'",
|
log.debug("'%s': get file size '%s'",
|
||||||
d.name,
|
d.name,
|
||||||
|
@ -1396,6 +1425,7 @@ ircd::db::database::env::GetFileSize(const std::string& name,
|
||||||
rocksdb::Status
|
rocksdb::Status
|
||||||
ircd::db::database::env::GetFileModificationTime(const std::string& name,
|
ircd::db::database::env::GetFileModificationTime(const std::string& name,
|
||||||
uint64_t* file_mtime)
|
uint64_t* file_mtime)
|
||||||
|
noexcept
|
||||||
{
|
{
|
||||||
log.debug("'%s': get file mtime '%s'",
|
log.debug("'%s': get file mtime '%s'",
|
||||||
d.name,
|
d.name,
|
||||||
|
@ -1407,6 +1437,7 @@ ircd::db::database::env::GetFileModificationTime(const std::string& name,
|
||||||
rocksdb::Status
|
rocksdb::Status
|
||||||
ircd::db::database::env::RenameFile(const std::string& s,
|
ircd::db::database::env::RenameFile(const std::string& s,
|
||||||
const std::string& t)
|
const std::string& t)
|
||||||
|
noexcept
|
||||||
{
|
{
|
||||||
log.debug("'%s': rename file '%s' to '%s'",
|
log.debug("'%s': rename file '%s' to '%s'",
|
||||||
d.name,
|
d.name,
|
||||||
|
@ -1419,6 +1450,7 @@ ircd::db::database::env::RenameFile(const std::string& s,
|
||||||
rocksdb::Status
|
rocksdb::Status
|
||||||
ircd::db::database::env::LinkFile(const std::string& s,
|
ircd::db::database::env::LinkFile(const std::string& s,
|
||||||
const std::string& t)
|
const std::string& t)
|
||||||
|
noexcept
|
||||||
{
|
{
|
||||||
log.debug("'%s': link file '%s' to '%s'",
|
log.debug("'%s': link file '%s' to '%s'",
|
||||||
d.name,
|
d.name,
|
||||||
|
@ -1431,6 +1463,7 @@ ircd::db::database::env::LinkFile(const std::string& s,
|
||||||
rocksdb::Status
|
rocksdb::Status
|
||||||
ircd::db::database::env::LockFile(const std::string& name,
|
ircd::db::database::env::LockFile(const std::string& name,
|
||||||
FileLock** l)
|
FileLock** l)
|
||||||
|
noexcept
|
||||||
{
|
{
|
||||||
log.debug("'%s': lock file '%s'",
|
log.debug("'%s': lock file '%s'",
|
||||||
d.name,
|
d.name,
|
||||||
|
@ -1441,6 +1474,7 @@ ircd::db::database::env::LockFile(const std::string& name,
|
||||||
|
|
||||||
rocksdb::Status
|
rocksdb::Status
|
||||||
ircd::db::database::env::UnlockFile(FileLock* l)
|
ircd::db::database::env::UnlockFile(FileLock* l)
|
||||||
|
noexcept
|
||||||
{
|
{
|
||||||
log.debug("'%s': unlock file lock:%p",
|
log.debug("'%s': unlock file lock:%p",
|
||||||
d.name,
|
d.name,
|
||||||
|
@ -1455,6 +1489,7 @@ ircd::db::database::env::Schedule(void (*f)(void* arg),
|
||||||
Priority prio,
|
Priority prio,
|
||||||
void* tag,
|
void* tag,
|
||||||
void (*u)(void* arg))
|
void (*u)(void* arg))
|
||||||
|
noexcept
|
||||||
{
|
{
|
||||||
log.debug("'%s': schedule func:%p a:%p tag:%p u:%p prio:%s",
|
log.debug("'%s': schedule func:%p a:%p tag:%p u:%p prio:%s",
|
||||||
d.name,
|
d.name,
|
||||||
|
@ -1470,6 +1505,7 @@ ircd::db::database::env::Schedule(void (*f)(void* arg),
|
||||||
int
|
int
|
||||||
ircd::db::database::env::UnSchedule(void* tag,
|
ircd::db::database::env::UnSchedule(void* tag,
|
||||||
Priority pri)
|
Priority pri)
|
||||||
|
noexcept
|
||||||
{
|
{
|
||||||
log.debug("'%s': unschedule tag:%p prio:%s",
|
log.debug("'%s': unschedule tag:%p prio:%s",
|
||||||
d.name,
|
d.name,
|
||||||
|
@ -1482,6 +1518,7 @@ ircd::db::database::env::UnSchedule(void* tag,
|
||||||
void
|
void
|
||||||
ircd::db::database::env::StartThread(void (*f)(void*),
|
ircd::db::database::env::StartThread(void (*f)(void*),
|
||||||
void* a)
|
void* a)
|
||||||
|
noexcept
|
||||||
{
|
{
|
||||||
log.debug("'%s': start thread func:%p a:%p",
|
log.debug("'%s': start thread func:%p a:%p",
|
||||||
d.name,
|
d.name,
|
||||||
|
@ -1493,13 +1530,14 @@ ircd::db::database::env::StartThread(void (*f)(void*),
|
||||||
|
|
||||||
void
|
void
|
||||||
ircd::db::database::env::WaitForJoin()
|
ircd::db::database::env::WaitForJoin()
|
||||||
|
noexcept
|
||||||
{
|
{
|
||||||
return defaults.WaitForJoin();
|
return defaults.WaitForJoin();
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int
|
unsigned int
|
||||||
ircd::db::database::env::GetThreadPoolQueueLen(Priority pri)
|
ircd::db::database::env::GetThreadPoolQueueLen(Priority pri)
|
||||||
const
|
const noexcept
|
||||||
{
|
{
|
||||||
log.debug("'%s': get thread pool queue len prio:%s",
|
log.debug("'%s': get thread pool queue len prio:%s",
|
||||||
d.name,
|
d.name,
|
||||||
|
@ -1510,6 +1548,7 @@ const
|
||||||
|
|
||||||
rocksdb::Status
|
rocksdb::Status
|
||||||
ircd::db::database::env::GetTestDirectory(std::string* path)
|
ircd::db::database::env::GetTestDirectory(std::string* path)
|
||||||
|
noexcept
|
||||||
{
|
{
|
||||||
return defaults.GetTestDirectory(path);
|
return defaults.GetTestDirectory(path);
|
||||||
}
|
}
|
||||||
|
@ -1517,18 +1556,21 @@ ircd::db::database::env::GetTestDirectory(std::string* path)
|
||||||
rocksdb::Status
|
rocksdb::Status
|
||||||
ircd::db::database::env::NewLogger(const std::string& name,
|
ircd::db::database::env::NewLogger(const std::string& name,
|
||||||
std::shared_ptr<Logger>* result)
|
std::shared_ptr<Logger>* result)
|
||||||
|
noexcept
|
||||||
{
|
{
|
||||||
return defaults.NewLogger(name, result);
|
return defaults.NewLogger(name, result);
|
||||||
}
|
}
|
||||||
|
|
||||||
uint64_t
|
uint64_t
|
||||||
ircd::db::database::env::NowMicros()
|
ircd::db::database::env::NowMicros()
|
||||||
|
noexcept
|
||||||
{
|
{
|
||||||
return defaults.NowMicros();
|
return defaults.NowMicros();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ircd::db::database::env::SleepForMicroseconds(int micros)
|
ircd::db::database::env::SleepForMicroseconds(int micros)
|
||||||
|
noexcept
|
||||||
{
|
{
|
||||||
log.debug("'%s': sleep for %d microseconds",
|
log.debug("'%s': sleep for %d microseconds",
|
||||||
d.name,
|
d.name,
|
||||||
|
@ -1540,6 +1582,7 @@ ircd::db::database::env::SleepForMicroseconds(int micros)
|
||||||
rocksdb::Status
|
rocksdb::Status
|
||||||
ircd::db::database::env::GetHostName(char* name,
|
ircd::db::database::env::GetHostName(char* name,
|
||||||
uint64_t len)
|
uint64_t len)
|
||||||
|
noexcept
|
||||||
{
|
{
|
||||||
log.debug("'%s': get host name name:%p len:%lu",
|
log.debug("'%s': get host name name:%p len:%lu",
|
||||||
d.name,
|
d.name,
|
||||||
|
@ -1551,6 +1594,7 @@ ircd::db::database::env::GetHostName(char* name,
|
||||||
|
|
||||||
rocksdb::Status
|
rocksdb::Status
|
||||||
ircd::db::database::env::GetCurrentTime(int64_t* unix_time)
|
ircd::db::database::env::GetCurrentTime(int64_t* unix_time)
|
||||||
|
noexcept
|
||||||
{
|
{
|
||||||
return defaults.GetCurrentTime(unix_time);
|
return defaults.GetCurrentTime(unix_time);
|
||||||
}
|
}
|
||||||
|
@ -1558,6 +1602,7 @@ ircd::db::database::env::GetCurrentTime(int64_t* unix_time)
|
||||||
rocksdb::Status
|
rocksdb::Status
|
||||||
ircd::db::database::env::GetAbsolutePath(const std::string& db_path,
|
ircd::db::database::env::GetAbsolutePath(const std::string& db_path,
|
||||||
std::string* output_path)
|
std::string* output_path)
|
||||||
|
noexcept
|
||||||
{
|
{
|
||||||
log.debug("'%s': get absolute path from '%s' ret:%p",
|
log.debug("'%s': get absolute path from '%s' ret:%p",
|
||||||
d.name,
|
d.name,
|
||||||
|
@ -1570,6 +1615,7 @@ ircd::db::database::env::GetAbsolutePath(const std::string& db_path,
|
||||||
void
|
void
|
||||||
ircd::db::database::env::SetBackgroundThreads(int num,
|
ircd::db::database::env::SetBackgroundThreads(int num,
|
||||||
Priority pri)
|
Priority pri)
|
||||||
|
noexcept
|
||||||
{
|
{
|
||||||
log.debug("'%s': set background threads num:%d prio:%s",
|
log.debug("'%s': set background threads num:%d prio:%s",
|
||||||
d.name,
|
d.name,
|
||||||
|
@ -1582,6 +1628,7 @@ ircd::db::database::env::SetBackgroundThreads(int num,
|
||||||
void
|
void
|
||||||
ircd::db::database::env::IncBackgroundThreadsIfNeeded(int num,
|
ircd::db::database::env::IncBackgroundThreadsIfNeeded(int num,
|
||||||
Priority pri)
|
Priority pri)
|
||||||
|
noexcept
|
||||||
{
|
{
|
||||||
log.debug("'%s': increase background threads num:%d prio:%s",
|
log.debug("'%s': increase background threads num:%d prio:%s",
|
||||||
d.name,
|
d.name,
|
||||||
|
@ -1593,6 +1640,7 @@ ircd::db::database::env::IncBackgroundThreadsIfNeeded(int num,
|
||||||
|
|
||||||
void
|
void
|
||||||
ircd::db::database::env::LowerThreadPoolIOPriority(Priority pool)
|
ircd::db::database::env::LowerThreadPoolIOPriority(Priority pool)
|
||||||
|
noexcept
|
||||||
{
|
{
|
||||||
log.debug("'%s': lower thread pool priority prio:%s",
|
log.debug("'%s': lower thread pool priority prio:%s",
|
||||||
d.name,
|
d.name,
|
||||||
|
@ -1603,26 +1651,28 @@ ircd::db::database::env::LowerThreadPoolIOPriority(Priority pool)
|
||||||
|
|
||||||
std::string
|
std::string
|
||||||
ircd::db::database::env::TimeToString(uint64_t time)
|
ircd::db::database::env::TimeToString(uint64_t time)
|
||||||
|
noexcept
|
||||||
{
|
{
|
||||||
return defaults.TimeToString(time);
|
return defaults.TimeToString(time);
|
||||||
}
|
}
|
||||||
|
|
||||||
rocksdb::Status
|
rocksdb::Status
|
||||||
ircd::db::database::env::GetThreadList(std::vector<ThreadStatus>* thread_list)
|
ircd::db::database::env::GetThreadList(std::vector<ThreadStatus>* thread_list)
|
||||||
|
noexcept
|
||||||
{
|
{
|
||||||
return defaults.GetThreadList(thread_list);
|
return defaults.GetThreadList(thread_list);
|
||||||
}
|
}
|
||||||
|
|
||||||
rocksdb::ThreadStatusUpdater*
|
rocksdb::ThreadStatusUpdater*
|
||||||
ircd::db::database::env::GetThreadStatusUpdater()
|
ircd::db::database::env::GetThreadStatusUpdater()
|
||||||
const
|
const noexcept
|
||||||
{
|
{
|
||||||
return defaults.GetThreadStatusUpdater();
|
return defaults.GetThreadStatusUpdater();
|
||||||
}
|
}
|
||||||
|
|
||||||
uint64_t
|
uint64_t
|
||||||
ircd::db::database::env::GetThreadID()
|
ircd::db::database::env::GetThreadID()
|
||||||
const
|
const noexcept
|
||||||
{
|
{
|
||||||
return defaults.GetThreadID();
|
return defaults.GetThreadID();
|
||||||
}
|
}
|
||||||
|
@ -1647,6 +1697,7 @@ noexcept
|
||||||
|
|
||||||
rocksdb::Status
|
rocksdb::Status
|
||||||
ircd::db::database::env::writable_file::Append(const Slice& s)
|
ircd::db::database::env::writable_file::Append(const Slice& s)
|
||||||
|
noexcept
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
log.debug("'%s': wfile:%p append:%p bytes:%zu",
|
log.debug("'%s': wfile:%p append:%p bytes:%zu",
|
||||||
|
@ -1662,6 +1713,7 @@ ircd::db::database::env::writable_file::Append(const Slice& s)
|
||||||
rocksdb::Status
|
rocksdb::Status
|
||||||
ircd::db::database::env::writable_file::PositionedAppend(const Slice& s,
|
ircd::db::database::env::writable_file::PositionedAppend(const Slice& s,
|
||||||
uint64_t offset)
|
uint64_t offset)
|
||||||
|
noexcept
|
||||||
{
|
{
|
||||||
log.debug("'%s': wfile:%p append:%p bytes:%zu offset:%lu",
|
log.debug("'%s': wfile:%p append:%p bytes:%zu offset:%lu",
|
||||||
d.name,
|
d.name,
|
||||||
|
@ -1675,6 +1727,7 @@ ircd::db::database::env::writable_file::PositionedAppend(const Slice& s,
|
||||||
|
|
||||||
rocksdb::Status
|
rocksdb::Status
|
||||||
ircd::db::database::env::writable_file::Truncate(uint64_t size)
|
ircd::db::database::env::writable_file::Truncate(uint64_t size)
|
||||||
|
noexcept
|
||||||
{
|
{
|
||||||
log.debug("'%s': wfile:%p truncate to %lu bytes",
|
log.debug("'%s': wfile:%p truncate to %lu bytes",
|
||||||
d.name,
|
d.name,
|
||||||
|
@ -1686,6 +1739,7 @@ ircd::db::database::env::writable_file::Truncate(uint64_t size)
|
||||||
|
|
||||||
rocksdb::Status
|
rocksdb::Status
|
||||||
ircd::db::database::env::writable_file::Close()
|
ircd::db::database::env::writable_file::Close()
|
||||||
|
noexcept
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
log.debug("'%s': wfile:%p close",
|
log.debug("'%s': wfile:%p close",
|
||||||
|
@ -1697,6 +1751,7 @@ ircd::db::database::env::writable_file::Close()
|
||||||
|
|
||||||
rocksdb::Status
|
rocksdb::Status
|
||||||
ircd::db::database::env::writable_file::Flush()
|
ircd::db::database::env::writable_file::Flush()
|
||||||
|
noexcept
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
log.debug("'%s': wfile:%p flush",
|
log.debug("'%s': wfile:%p flush",
|
||||||
|
@ -1708,6 +1763,7 @@ ircd::db::database::env::writable_file::Flush()
|
||||||
|
|
||||||
rocksdb::Status
|
rocksdb::Status
|
||||||
ircd::db::database::env::writable_file::Sync()
|
ircd::db::database::env::writable_file::Sync()
|
||||||
|
noexcept
|
||||||
{
|
{
|
||||||
log.debug("'%s': wfile:%p sync",
|
log.debug("'%s': wfile:%p sync",
|
||||||
d.name,
|
d.name,
|
||||||
|
@ -1718,6 +1774,7 @@ ircd::db::database::env::writable_file::Sync()
|
||||||
|
|
||||||
rocksdb::Status
|
rocksdb::Status
|
||||||
ircd::db::database::env::writable_file::Fsync()
|
ircd::db::database::env::writable_file::Fsync()
|
||||||
|
noexcept
|
||||||
{
|
{
|
||||||
log.debug("'%s': wfile:%p fsync",
|
log.debug("'%s': wfile:%p fsync",
|
||||||
d.name,
|
d.name,
|
||||||
|
@ -1728,13 +1785,14 @@ ircd::db::database::env::writable_file::Fsync()
|
||||||
|
|
||||||
bool
|
bool
|
||||||
ircd::db::database::env::writable_file::IsSyncThreadSafe()
|
ircd::db::database::env::writable_file::IsSyncThreadSafe()
|
||||||
const
|
const noexcept
|
||||||
{
|
{
|
||||||
return defaults->IsSyncThreadSafe();
|
return defaults->IsSyncThreadSafe();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ircd::db::database::env::writable_file::SetIOPriority(Env::IOPriority prio)
|
ircd::db::database::env::writable_file::SetIOPriority(Env::IOPriority prio)
|
||||||
|
noexcept
|
||||||
{
|
{
|
||||||
log.debug("'%s': wfile:%p set IO prio to %s",
|
log.debug("'%s': wfile:%p set IO prio to %s",
|
||||||
d.name,
|
d.name,
|
||||||
|
@ -1746,12 +1804,14 @@ ircd::db::database::env::writable_file::SetIOPriority(Env::IOPriority prio)
|
||||||
|
|
||||||
rocksdb::Env::IOPriority
|
rocksdb::Env::IOPriority
|
||||||
ircd::db::database::env::writable_file::GetIOPriority()
|
ircd::db::database::env::writable_file::GetIOPriority()
|
||||||
|
noexcept
|
||||||
{
|
{
|
||||||
return defaults->GetIOPriority();
|
return defaults->GetIOPriority();
|
||||||
}
|
}
|
||||||
|
|
||||||
uint64_t
|
uint64_t
|
||||||
ircd::db::database::env::writable_file::GetFileSize()
|
ircd::db::database::env::writable_file::GetFileSize()
|
||||||
|
noexcept
|
||||||
{
|
{
|
||||||
return defaults->GetFileSize();
|
return defaults->GetFileSize();
|
||||||
}
|
}
|
||||||
|
@ -1759,6 +1819,7 @@ ircd::db::database::env::writable_file::GetFileSize()
|
||||||
void
|
void
|
||||||
ircd::db::database::env::writable_file::GetPreallocationStatus(size_t* block_size,
|
ircd::db::database::env::writable_file::GetPreallocationStatus(size_t* block_size,
|
||||||
size_t* last_allocated_block)
|
size_t* last_allocated_block)
|
||||||
|
noexcept
|
||||||
{
|
{
|
||||||
log.debug("'%s': wfile:%p get preallocation block_size:%p last_block:%p",
|
log.debug("'%s': wfile:%p get preallocation block_size:%p last_block:%p",
|
||||||
d.name,
|
d.name,
|
||||||
|
@ -1772,7 +1833,7 @@ ircd::db::database::env::writable_file::GetPreallocationStatus(size_t* block_siz
|
||||||
size_t
|
size_t
|
||||||
ircd::db::database::env::writable_file::GetUniqueId(char* id,
|
ircd::db::database::env::writable_file::GetUniqueId(char* id,
|
||||||
size_t max_size)
|
size_t max_size)
|
||||||
const
|
const noexcept
|
||||||
{
|
{
|
||||||
log.debug("'%s': wfile:%p get unique id:%p max_size:%zu",
|
log.debug("'%s': wfile:%p get unique id:%p max_size:%zu",
|
||||||
d.name,
|
d.name,
|
||||||
|
@ -1786,6 +1847,7 @@ const
|
||||||
rocksdb::Status
|
rocksdb::Status
|
||||||
ircd::db::database::env::writable_file::InvalidateCache(size_t offset,
|
ircd::db::database::env::writable_file::InvalidateCache(size_t offset,
|
||||||
size_t length)
|
size_t length)
|
||||||
|
noexcept
|
||||||
{
|
{
|
||||||
log.debug("'%s': wfile:%p invalidate cache offset:%zu length:%zu",
|
log.debug("'%s': wfile:%p invalidate cache offset:%zu length:%zu",
|
||||||
d.name,
|
d.name,
|
||||||
|
@ -1798,6 +1860,7 @@ ircd::db::database::env::writable_file::InvalidateCache(size_t offset,
|
||||||
|
|
||||||
void
|
void
|
||||||
ircd::db::database::env::writable_file::SetPreallocationBlockSize(size_t size)
|
ircd::db::database::env::writable_file::SetPreallocationBlockSize(size_t size)
|
||||||
|
noexcept
|
||||||
{
|
{
|
||||||
log.debug("'%s': wfile:%p set preallocation block size:%zu",
|
log.debug("'%s': wfile:%p set preallocation block size:%zu",
|
||||||
d.name,
|
d.name,
|
||||||
|
@ -1810,6 +1873,7 @@ ircd::db::database::env::writable_file::SetPreallocationBlockSize(size_t size)
|
||||||
void
|
void
|
||||||
ircd::db::database::env::writable_file::PrepareWrite(size_t offset,
|
ircd::db::database::env::writable_file::PrepareWrite(size_t offset,
|
||||||
size_t length)
|
size_t length)
|
||||||
|
noexcept
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
log.debug("'%s': wfile:%p prepare write offset:%zu length:%zu",
|
log.debug("'%s': wfile:%p prepare write offset:%zu length:%zu",
|
||||||
|
@ -1824,6 +1888,7 @@ ircd::db::database::env::writable_file::PrepareWrite(size_t offset,
|
||||||
rocksdb::Status
|
rocksdb::Status
|
||||||
ircd::db::database::env::writable_file::Allocate(uint64_t offset,
|
ircd::db::database::env::writable_file::Allocate(uint64_t offset,
|
||||||
uint64_t length)
|
uint64_t length)
|
||||||
|
noexcept
|
||||||
{
|
{
|
||||||
log.debug("'%s': wfile:%p allocate offset:%lu length:%lu",
|
log.debug("'%s': wfile:%p allocate offset:%lu length:%lu",
|
||||||
d.name,
|
d.name,
|
||||||
|
@ -1837,6 +1902,7 @@ ircd::db::database::env::writable_file::Allocate(uint64_t offset,
|
||||||
rocksdb::Status
|
rocksdb::Status
|
||||||
ircd::db::database::env::writable_file::RangeSync(uint64_t offset,
|
ircd::db::database::env::writable_file::RangeSync(uint64_t offset,
|
||||||
uint64_t length)
|
uint64_t length)
|
||||||
|
noexcept
|
||||||
{
|
{
|
||||||
log.debug("'%s': wfile:%p range sync offset:%lu length:%lu",
|
log.debug("'%s': wfile:%p range sync offset:%lu length:%lu",
|
||||||
d.name,
|
d.name,
|
||||||
|
@ -1869,6 +1935,7 @@ rocksdb::Status
|
||||||
ircd::db::database::env::sequential_file::Read(size_t length,
|
ircd::db::database::env::sequential_file::Read(size_t length,
|
||||||
Slice *result,
|
Slice *result,
|
||||||
char *scratch)
|
char *scratch)
|
||||||
|
noexcept
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
log.debug("'%s': seqfile:%p read:%p length:%zu scratch:%p",
|
log.debug("'%s': seqfile:%p read:%p length:%zu scratch:%p",
|
||||||
|
@ -1886,6 +1953,7 @@ ircd::db::database::env::sequential_file::PositionedRead(uint64_t offset,
|
||||||
size_t length,
|
size_t length,
|
||||||
Slice *result,
|
Slice *result,
|
||||||
char *scratch)
|
char *scratch)
|
||||||
|
noexcept
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
log.debug("'%s': seqfile:%p read:%p length:%zu offset:%zu scratch:%p",
|
log.debug("'%s': seqfile:%p read:%p length:%zu offset:%zu scratch:%p",
|
||||||
|
@ -1901,6 +1969,7 @@ ircd::db::database::env::sequential_file::PositionedRead(uint64_t offset,
|
||||||
|
|
||||||
rocksdb::Status
|
rocksdb::Status
|
||||||
ircd::db::database::env::sequential_file::Skip(uint64_t size)
|
ircd::db::database::env::sequential_file::Skip(uint64_t size)
|
||||||
|
noexcept
|
||||||
{
|
{
|
||||||
log.debug("'%s': seqfile:%p skip:%zu",
|
log.debug("'%s': seqfile:%p skip:%zu",
|
||||||
d.name,
|
d.name,
|
||||||
|
@ -1913,6 +1982,7 @@ ircd::db::database::env::sequential_file::Skip(uint64_t size)
|
||||||
rocksdb::Status
|
rocksdb::Status
|
||||||
ircd::db::database::env::sequential_file::InvalidateCache(size_t offset,
|
ircd::db::database::env::sequential_file::InvalidateCache(size_t offset,
|
||||||
size_t length)
|
size_t length)
|
||||||
|
noexcept
|
||||||
{
|
{
|
||||||
log.debug("'%s': seqfile:%p invalidate cache offset:%zu length:%zu",
|
log.debug("'%s': seqfile:%p invalidate cache offset:%zu length:%zu",
|
||||||
d.name,
|
d.name,
|
||||||
|
@ -1925,14 +1995,14 @@ ircd::db::database::env::sequential_file::InvalidateCache(size_t offset,
|
||||||
|
|
||||||
bool
|
bool
|
||||||
ircd::db::database::env::sequential_file::use_direct_io()
|
ircd::db::database::env::sequential_file::use_direct_io()
|
||||||
const
|
const noexcept
|
||||||
{
|
{
|
||||||
return defaults->use_direct_io();
|
return defaults->use_direct_io();
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t
|
size_t
|
||||||
ircd::db::database::env::sequential_file::GetRequiredBufferAlignment()
|
ircd::db::database::env::sequential_file::GetRequiredBufferAlignment()
|
||||||
const
|
const noexcept
|
||||||
{
|
{
|
||||||
return defaults->GetRequiredBufferAlignment();
|
return defaults->GetRequiredBufferAlignment();
|
||||||
}
|
}
|
||||||
|
@ -1958,6 +2028,7 @@ noexcept
|
||||||
rocksdb::Status
|
rocksdb::Status
|
||||||
ircd::db::database::env::random_access_file::Prefetch(uint64_t offset,
|
ircd::db::database::env::random_access_file::Prefetch(uint64_t offset,
|
||||||
size_t length)
|
size_t length)
|
||||||
|
noexcept
|
||||||
{
|
{
|
||||||
log.debug("'%s': rfile:%p prefetch offset:%zu length:%zu",
|
log.debug("'%s': rfile:%p prefetch offset:%zu length:%zu",
|
||||||
d.name,
|
d.name,
|
||||||
|
@ -1973,7 +2044,7 @@ ircd::db::database::env::random_access_file::Read(uint64_t offset,
|
||||||
size_t length,
|
size_t length,
|
||||||
Slice *result,
|
Slice *result,
|
||||||
char *scratch)
|
char *scratch)
|
||||||
const
|
const noexcept
|
||||||
{
|
{
|
||||||
log.debug("'%s': rfile:%p read:%p offset:%zu length:%zu scratch:%p",
|
log.debug("'%s': rfile:%p read:%p offset:%zu length:%zu scratch:%p",
|
||||||
d.name,
|
d.name,
|
||||||
|
@ -1989,6 +2060,7 @@ const
|
||||||
rocksdb::Status
|
rocksdb::Status
|
||||||
ircd::db::database::env::random_access_file::InvalidateCache(size_t offset,
|
ircd::db::database::env::random_access_file::InvalidateCache(size_t offset,
|
||||||
size_t length)
|
size_t length)
|
||||||
|
noexcept
|
||||||
{
|
{
|
||||||
log.debug("'%s': rfile:%p invalidate cache offset:%zu length:%zu",
|
log.debug("'%s': rfile:%p invalidate cache offset:%zu length:%zu",
|
||||||
d.name,
|
d.name,
|
||||||
|
@ -2002,7 +2074,7 @@ ircd::db::database::env::random_access_file::InvalidateCache(size_t offset,
|
||||||
size_t
|
size_t
|
||||||
ircd::db::database::env::random_access_file::GetUniqueId(char* id,
|
ircd::db::database::env::random_access_file::GetUniqueId(char* id,
|
||||||
size_t max_size)
|
size_t max_size)
|
||||||
const
|
const noexcept
|
||||||
{
|
{
|
||||||
log.debug("'%s': rfile:%p get unique id:%p max_size:%zu",
|
log.debug("'%s': rfile:%p get unique id:%p max_size:%zu",
|
||||||
d.name,
|
d.name,
|
||||||
|
@ -2015,6 +2087,7 @@ const
|
||||||
|
|
||||||
void
|
void
|
||||||
ircd::db::database::env::random_access_file::Hint(AccessPattern pattern)
|
ircd::db::database::env::random_access_file::Hint(AccessPattern pattern)
|
||||||
|
noexcept
|
||||||
{
|
{
|
||||||
log.debug("'%s': rfile:%p hint %s",
|
log.debug("'%s': rfile:%p hint %s",
|
||||||
d.name,
|
d.name,
|
||||||
|
@ -2026,14 +2099,14 @@ ircd::db::database::env::random_access_file::Hint(AccessPattern pattern)
|
||||||
|
|
||||||
bool
|
bool
|
||||||
ircd::db::database::env::random_access_file::use_direct_io()
|
ircd::db::database::env::random_access_file::use_direct_io()
|
||||||
const
|
const noexcept
|
||||||
{
|
{
|
||||||
return defaults->use_direct_io();
|
return defaults->use_direct_io();
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t
|
size_t
|
||||||
ircd::db::database::env::random_access_file::GetRequiredBufferAlignment()
|
ircd::db::database::env::random_access_file::GetRequiredBufferAlignment()
|
||||||
const
|
const noexcept
|
||||||
{
|
{
|
||||||
return defaults->GetRequiredBufferAlignment();
|
return defaults->GetRequiredBufferAlignment();
|
||||||
}
|
}
|
||||||
|
@ -2058,6 +2131,7 @@ noexcept
|
||||||
|
|
||||||
rocksdb::Status
|
rocksdb::Status
|
||||||
ircd::db::database::env::random_rw_file::Close()
|
ircd::db::database::env::random_rw_file::Close()
|
||||||
|
noexcept
|
||||||
{
|
{
|
||||||
log.debug("'%s': rwfile:%p closec",
|
log.debug("'%s': rwfile:%p closec",
|
||||||
d.name,
|
d.name,
|
||||||
|
@ -2068,6 +2142,7 @@ ircd::db::database::env::random_rw_file::Close()
|
||||||
|
|
||||||
rocksdb::Status
|
rocksdb::Status
|
||||||
ircd::db::database::env::random_rw_file::Fsync()
|
ircd::db::database::env::random_rw_file::Fsync()
|
||||||
|
noexcept
|
||||||
{
|
{
|
||||||
log.debug("'%s': rwfile:%p fsync",
|
log.debug("'%s': rwfile:%p fsync",
|
||||||
d.name,
|
d.name,
|
||||||
|
@ -2078,6 +2153,7 @@ ircd::db::database::env::random_rw_file::Fsync()
|
||||||
|
|
||||||
rocksdb::Status
|
rocksdb::Status
|
||||||
ircd::db::database::env::random_rw_file::Sync()
|
ircd::db::database::env::random_rw_file::Sync()
|
||||||
|
noexcept
|
||||||
{
|
{
|
||||||
log.debug("'%s': rwfile:%p sync",
|
log.debug("'%s': rwfile:%p sync",
|
||||||
d.name,
|
d.name,
|
||||||
|
@ -2088,6 +2164,7 @@ ircd::db::database::env::random_rw_file::Sync()
|
||||||
|
|
||||||
rocksdb::Status
|
rocksdb::Status
|
||||||
ircd::db::database::env::random_rw_file::Flush()
|
ircd::db::database::env::random_rw_file::Flush()
|
||||||
|
noexcept
|
||||||
{
|
{
|
||||||
log.debug("'%s': rwfile:%p flush",
|
log.debug("'%s': rwfile:%p flush",
|
||||||
d.name,
|
d.name,
|
||||||
|
@ -2101,7 +2178,7 @@ ircd::db::database::env::random_rw_file::Read(uint64_t offset,
|
||||||
size_t length,
|
size_t length,
|
||||||
Slice *result,
|
Slice *result,
|
||||||
char *scratch)
|
char *scratch)
|
||||||
const
|
const noexcept
|
||||||
{
|
{
|
||||||
log.debug("'%s': rwfile:%p read:%p offset:%zu length:%zu scratch:%p",
|
log.debug("'%s': rwfile:%p read:%p offset:%zu length:%zu scratch:%p",
|
||||||
d.name,
|
d.name,
|
||||||
|
@ -2117,6 +2194,7 @@ const
|
||||||
rocksdb::Status
|
rocksdb::Status
|
||||||
ircd::db::database::env::random_rw_file::Write(uint64_t offset,
|
ircd::db::database::env::random_rw_file::Write(uint64_t offset,
|
||||||
const Slice &slice)
|
const Slice &slice)
|
||||||
|
noexcept
|
||||||
{
|
{
|
||||||
log.debug("'%s': rwfile:%p write:%p offset:%zu length:%zu",
|
log.debug("'%s': rwfile:%p write:%p offset:%zu length:%zu",
|
||||||
d.name,
|
d.name,
|
||||||
|
@ -2130,14 +2208,14 @@ ircd::db::database::env::random_rw_file::Write(uint64_t offset,
|
||||||
|
|
||||||
bool
|
bool
|
||||||
ircd::db::database::env::random_rw_file::use_direct_io()
|
ircd::db::database::env::random_rw_file::use_direct_io()
|
||||||
const
|
const noexcept
|
||||||
{
|
{
|
||||||
return defaults->use_direct_io();
|
return defaults->use_direct_io();
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t
|
size_t
|
||||||
ircd::db::database::env::random_rw_file::GetRequiredBufferAlignment()
|
ircd::db::database::env::random_rw_file::GetRequiredBufferAlignment()
|
||||||
const
|
const noexcept
|
||||||
{
|
{
|
||||||
return defaults->GetRequiredBufferAlignment();
|
return defaults->GetRequiredBufferAlignment();
|
||||||
}
|
}
|
||||||
|
@ -2161,6 +2239,7 @@ noexcept
|
||||||
|
|
||||||
rocksdb::Status
|
rocksdb::Status
|
||||||
ircd::db::database::env::directory::Fsync()
|
ircd::db::database::env::directory::Fsync()
|
||||||
|
noexcept
|
||||||
{
|
{
|
||||||
log.debug("'%s': directory:%p fsync",
|
log.debug("'%s': directory:%p fsync",
|
||||||
d.name,
|
d.name,
|
||||||
|
|
Loading…
Reference in a new issue