0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-12-30 17:34:04 +01:00

ircd::db: Quench exceptions on setting write life hint.

This commit is contained in:
Jason Volk 2019-05-08 19:10:50 -07:00
parent e670afbac8
commit 9e9afc3aa7

View file

@ -2054,21 +2054,35 @@ noexcept
void
ircd::db::database::env::writable_file::SetWriteLifeTimeHint(WriteLifeTimeHint hint)
noexcept
noexcept try
{
#ifdef RB_DEBUG_DB_ENV
log::debug
{
log, "'%s': wfile:%p hint %s",
log, "'%s': wfile:%p hint:%d %s",
d.name,
this,
reflect(hint)
int(hint),
reflect(hint),
};
#endif
this->hint = hint;
fs::write_life(fd, this->hint);
}
catch(const std::system_error &e)
{
log::derror
{
log, "'%s': wfile:%p fd:%d setting write lifetime hint:%d %s :%s",
d.name,
this,
int(fd),
int(hint),
reflect(hint),
e.what(),
};
}
rocksdb::Env::WriteLifeTimeHint
ircd::db::database::env::writable_file::GetWriteLifeTimeHint()