错误严重性等级:
Status::Severity::kSoftError
- Errors of this severity do not prevent writes to the DB, but it does mean that the DB is in a degraded mode. Background compactions and flush may not be able to run in a timely manner.Status::Severity::kHardError
- The DB is in read-only mode, but it can be transitioned back to read-write mode once the cause of the error has been addressed.Status::Severity::kFatalError
- The DB is in read-only mode. The only way to recover is to close the DB, remedy the underlying cause of the error, and then re-open the DB.Status::Severity::kUnrecoverableError
- This is the highest severity and indicates a corruption in the database. It may be possible to close and re-open the DB, but the contents of the database may no longer be correct.
错误严重性映射关系:
BackgroundErrorReason | Status::Code | Status::SubCode | paranoid_checks | Status::Severity |
BackgroundErrorReason::kCompaction | Status::Code::kIOError | Status::SubCode::kNoSpace | true | Status::Severity::kSoftError |
BackgroundErrorReason::kCompaction | Status::Code::kIOError | Status::SubCode::kNoSpace | false | Status::Severity::kNoError |
BackgroundErrorReason::kCompaction | Status::Code::kIOError | Status::SubCode::kSpaceLimit | true | Status::Severity::kHardError |
BackgroundErrorReason::kCompaction | Status::Code::kCorruption | true | Status::Severity::kUnrecoverableError | |
BackgroundErrorReason::kCompaction | Status::Code::kCorruption | false | Status::Severity::kNoError | |
BackgroundErrorReason::kCompaction | Status::Code::kIOError | true | Status::Severity::kFatalError | |
BackgroundErrorReason::kCompaction | Status::Code::kIOError | false | Status::Severity::kNoError | |
BackgroundErrorReason::kCompaction | true | Status::Severity::kFatalError | ||
BackgroundErrorReason::kCompaction | false | Status::Severity::kNoError | ||
BackgroundErrorReason::kFlush | Status::Code::kIOError | Status::SubCode::kNoSpace | true | Status::Severity::kHardError |
BackgroundErrorReason::kFlush | Status::Code::kIOError | Status::SubCode::kNoSpace | false | Status::Severity::kNoError |
BackgroundErrorReason::kFlush | Status::Code::kIOError | Status::SubCode::kSpaceLimit | true | Status::Severity::kHardError |
BackgroundErrorReason::kFlush | Status::Code::kCorruption | true | Status::Severity::kUnrecoverableError | |
BackgroundErrorReason::kFlush | Status::Code::kCorruption | false | Status::Severity::kNoError | |
BackgroundErrorReason::kFlush | Status::Code::kIOError | true | Status::Severity::kFatalError | |
BackgroundErrorReason::kFlush | Status::Code::kIOError | false | Status::Severity::kNoError | |
BackgroundErrorReason::kFlush | true | Status::Severity::kFatalError | ||
BackgroundErrorReason::kFlush | false | Status::Severity::kNoError | ||
BackgroundErrorReason::kWriteCallback | Status::Code::kIOError | Status::SubCode::kNoSpace | true | Status::Severity::kHardError |
BackgroundErrorReason::kWriteCallback | Status::Code::kIOError | Status::SubCode::kNoSpace | false | Status::Severity::kHardError |
BackgroundErrorReason::kWriteCallback | Status::Code::kCorruption | true | Status::Severity::kUnrecoverableError | |
BackgroundErrorReason::kWriteCallback | Status::Code::kCorruption | false | Status::Severity::kNoError | |
BackgroundErrorReason::kWriteCallback | Status::Code::kIOError | true | Status::Severity::kFatalError | |
BackgroundErrorReason::kWriteCallback | Status::Code::kIOError | false | Status::Severity::kNoError | |
BackgroundErrorReason::kWriteCallback | true | Status::Severity::kFatalError | ||
BackgroundErrorReason::kWriteCallback | false | Status::Severity::kFatalError | ||
BackgroundErrorReason::kMemTable | true | Status::Severity::kFatalError | ||
BackgroundErrorReason::kMemTable | false | Status::Severity::kFatalError |