0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-09-27 19:28:52 +02:00

ircd::db: Give some env callbacks handlers.

This commit is contained in:
Jason Volk 2018-08-23 18:57:24 -07:00
parent bbcddbcf5b
commit ec0670262e

View file

@ -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,