mirror of
https://github.com/matrix-construct/construct
synced 2024-11-29 02:02:38 +01:00
ircd::db: Quench exceptions on setting write life hint.
This commit is contained in:
parent
e670afbac8
commit
9e9afc3aa7
1 changed files with 17 additions and 3 deletions
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue