[Rockdsdb] Better Error messages. Closing db instead of deleting db

Summary: A better error message. A local change. Did not look at other places where this could be done.

Test Plan: compile

Reviewers: dhruba, MarkCallaghan

Reviewed By: dhruba

CC: leveldb

Differential Revision: https://reviews.facebook.net/D10251
This commit is contained in:
Abhishek Kona 2013-04-15 15:27:15 -07:00
parent 9b81d3c406
commit 7c6c3c0ff4
1 changed files with 4 additions and 2 deletions

View File

@ -816,7 +816,9 @@ Status DBImpl::CompactMemTable(bool* madeProgress) {
Status s = WriteLevel0Table(m, edit, &file_number);
if (s.ok() && shutting_down_.Acquire_Load()) {
s = Status::IOError("Deleting DB during memtable compaction");
s = Status::IOError(
"Database shutdown started during memtable compaction"
);
}
// Replace immutable memtable with the generated Table
@ -1741,7 +1743,7 @@ Status DBImpl::DoCompactionWork(CompactionState* compact) {
}
if (status.ok() && shutting_down_.Acquire_Load()) {
status = Status::IOError("Deleting DB during compaction");
status = Status::IOError("Database shutdown started during compaction");
}
if (status.ok() && compact->builder != nullptr) {
status = FinishCompactionOutputFile(compact, input.get());