From 7c6c3c0ff47eb852dccb9c22cf5618aea071cb87 Mon Sep 17 00:00:00 2001 From: Abhishek Kona Date: Mon, 15 Apr 2013 15:27:15 -0700 Subject: [PATCH] [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 --- db/db_impl.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/db/db_impl.cc b/db/db_impl.cc index ada7b3659..7f2cb033c 100644 --- a/db/db_impl.cc +++ b/db/db_impl.cc @@ -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());