Skip to content

Commit 664559f

Browse files
committed
Small final fixes before merge
1 parent d1e2bce commit 664559f

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

db/db_impl.cc

+3-6
Original file line numberDiff line numberDiff line change
@@ -1333,7 +1333,7 @@ Status DBImpl::FlushMemTableToOutputFile(ColumnFamilyData* cfd,
13331333

13341334
if (s.ok() && shutting_down_.Acquire_Load() && cfd->IsDropped()) {
13351335
s = Status::ShutdownInProgress(
1336-
"Column family closed during memtable flush");
1336+
"Database shutdown or Column family drop during flush");
13371337
}
13381338

13391339
if (!s.ok()) {
@@ -3412,7 +3412,6 @@ Status DBImpl::GetImpl(const ReadOptions& options,
34123412
// Done
34133413
RecordTick(options_.statistics.get(), MEMTABLE_HIT);
34143414
} else {
3415-
// Done
34163415
StopWatchNano from_files_timer(env_, false);
34173416
StartPerfTimer(&from_files_timer);
34183417

@@ -4055,8 +4054,6 @@ Status DBImpl::MakeRoomForWrite(ColumnFamilyData* cfd, bool force) {
40554054
// Yield previous error
40564055
s = bg_error_;
40574056
break;
4058-
} else if (cfd->IsDropped()) {
4059-
break;
40604057
} else if (allow_delay && cfd->NeedSlowdownForNumLevel0Files()) {
40614058
// We are getting close to hitting a hard limit on the number of
40624059
// L0 files. Rather than delaying a single write by several
@@ -4229,7 +4226,7 @@ Status DBImpl::MakeRoomForWrite(ColumnFamilyData* cfd, bool force) {
42294226
cfd->GetID(), (unsigned long)logfile_number_);
42304227
force = false; // Do not force another compaction if have room
42314228
MaybeScheduleFlushOrCompaction();
4232-
// TODO(icanadi) delete outside of mutex)
4229+
// TODO(icanadi) delete outside of mutex
42334230
delete cfd->InstallSuperVersion(new_superversion, &mutex_);
42344231
}
42354232
}
@@ -4342,7 +4339,7 @@ Status DBImpl::DeleteFile(std::string name) {
43424339
}
43434340

43444341
int level;
4345-
FileMetaData *metadata;
4342+
FileMetaData* metadata;
43464343
ColumnFamilyData* cfd;
43474344
VersionEdit edit;
43484345
DeletionState deletion_state(true);

include/rocksdb/db.h

+3
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,9 @@ class DB {
104104
// that modify data, like put/delete, will return error.
105105
// If the db is opened in read only mode, then no compactions
106106
// will happen.
107+
// TODO(icanadi): implement OpenForReadOnly that specifies column families.
108+
// User can open DB in read-only mode even if not specifying all column
109+
// families
107110
static Status OpenForReadOnly(const Options& options,
108111
const std::string& name, DB** dbptr,
109112
bool error_if_log_file_exist = false);

0 commit comments

Comments
 (0)