0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-29 10:12:39 +01:00

ircd::db: Downgrade error severity to allow administrative resume.

This commit is contained in:
Jason Volk 2018-11-02 00:05:21 -07:00
parent 94bfe39ec6
commit 7b798645a4

View file

@ -2429,6 +2429,15 @@ noexcept
return;
}
// Downgrade select fatal errors to hard errors. If this downgrade
// does not occur then it can never be cleared by a db::resume() and
// the daemon must be restarted.
if(reason == rocksdb::BackgroundErrorReason::kCompaction)
if(status->severity() == rocksdb::Status::kFatalError)
*status = rocksdb::Status(*status, rocksdb::Status::kHardError);
// Save the error string to the database instance for later examination.
d->errors.emplace_back(str);
}