mirror of
https://github.com/matrix-construct/construct
synced 2024-11-15 22:41:12 +01:00
ircd::db: Give some env callbacks handlers.
This commit is contained in:
parent
bbcddbcf5b
commit
ec0670262e
1 changed files with 18 additions and 2 deletions
20
ircd/db.cc
20
ircd/db.cc
|
@ -1873,7 +1873,7 @@ rocksdb::Status
|
|||
ircd::db::database::env::NewSequentialFile(const std::string& name,
|
||||
std::unique_ptr<SequentialFile> *const r,
|
||||
const EnvOptions &options)
|
||||
noexcept
|
||||
noexcept try
|
||||
{
|
||||
#ifdef RB_DEBUG_DB_ENV
|
||||
log::debug
|
||||
|
@ -1888,12 +1888,20 @@ noexcept
|
|||
*r = std::make_unique<sequential_file>(&d, name, options);
|
||||
return Status::OK();
|
||||
}
|
||||
catch(const fs::error &e)
|
||||
{
|
||||
return error_to_status{e};
|
||||
}
|
||||
catch(const std::exception &e)
|
||||
{
|
||||
return error_to_status{e};
|
||||
}
|
||||
|
||||
rocksdb::Status
|
||||
ircd::db::database::env::NewRandomAccessFile(const std::string& name,
|
||||
std::unique_ptr<RandomAccessFile> *const r,
|
||||
const EnvOptions &options)
|
||||
noexcept
|
||||
noexcept try
|
||||
{
|
||||
ctx::uninterruptible::nothrow ui;
|
||||
|
||||
|
@ -1910,6 +1918,14 @@ noexcept
|
|||
*r = std::make_unique<random_access_file>(&d, name, options);
|
||||
return Status::OK();
|
||||
}
|
||||
catch(const fs::error &e)
|
||||
{
|
||||
return error_to_status{e};
|
||||
}
|
||||
catch(const std::exception &e)
|
||||
{
|
||||
return error_to_status{e};
|
||||
}
|
||||
|
||||
rocksdb::Status
|
||||
ircd::db::database::env::NewWritableFile(const std::string& name,
|
||||
|
|
Loading…
Reference in a new issue