Small final fixes before merge
This commit is contained in:
parent
d1e2bce42d
commit
664559fe2d
@ -1333,7 +1333,7 @@ Status DBImpl::FlushMemTableToOutputFile(ColumnFamilyData* cfd,
|
|||||||
|
|
||||||
if (s.ok() && shutting_down_.Acquire_Load() && cfd->IsDropped()) {
|
if (s.ok() && shutting_down_.Acquire_Load() && cfd->IsDropped()) {
|
||||||
s = Status::ShutdownInProgress(
|
s = Status::ShutdownInProgress(
|
||||||
"Column family closed during memtable flush");
|
"Database shutdown or Column family drop during flush");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!s.ok()) {
|
if (!s.ok()) {
|
||||||
@ -3412,7 +3412,6 @@ Status DBImpl::GetImpl(const ReadOptions& options,
|
|||||||
// Done
|
// Done
|
||||||
RecordTick(options_.statistics.get(), MEMTABLE_HIT);
|
RecordTick(options_.statistics.get(), MEMTABLE_HIT);
|
||||||
} else {
|
} else {
|
||||||
// Done
|
|
||||||
StopWatchNano from_files_timer(env_, false);
|
StopWatchNano from_files_timer(env_, false);
|
||||||
StartPerfTimer(&from_files_timer);
|
StartPerfTimer(&from_files_timer);
|
||||||
|
|
||||||
@ -4055,8 +4054,6 @@ Status DBImpl::MakeRoomForWrite(ColumnFamilyData* cfd, bool force) {
|
|||||||
// Yield previous error
|
// Yield previous error
|
||||||
s = bg_error_;
|
s = bg_error_;
|
||||||
break;
|
break;
|
||||||
} else if (cfd->IsDropped()) {
|
|
||||||
break;
|
|
||||||
} else if (allow_delay && cfd->NeedSlowdownForNumLevel0Files()) {
|
} else if (allow_delay && cfd->NeedSlowdownForNumLevel0Files()) {
|
||||||
// We are getting close to hitting a hard limit on the number of
|
// We are getting close to hitting a hard limit on the number of
|
||||||
// L0 files. Rather than delaying a single write by several
|
// L0 files. Rather than delaying a single write by several
|
||||||
@ -4229,7 +4226,7 @@ Status DBImpl::MakeRoomForWrite(ColumnFamilyData* cfd, bool force) {
|
|||||||
cfd->GetID(), (unsigned long)logfile_number_);
|
cfd->GetID(), (unsigned long)logfile_number_);
|
||||||
force = false; // Do not force another compaction if have room
|
force = false; // Do not force another compaction if have room
|
||||||
MaybeScheduleFlushOrCompaction();
|
MaybeScheduleFlushOrCompaction();
|
||||||
// TODO(icanadi) delete outside of mutex)
|
// TODO(icanadi) delete outside of mutex
|
||||||
delete cfd->InstallSuperVersion(new_superversion, &mutex_);
|
delete cfd->InstallSuperVersion(new_superversion, &mutex_);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -4342,7 +4339,7 @@ Status DBImpl::DeleteFile(std::string name) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int level;
|
int level;
|
||||||
FileMetaData *metadata;
|
FileMetaData* metadata;
|
||||||
ColumnFamilyData* cfd;
|
ColumnFamilyData* cfd;
|
||||||
VersionEdit edit;
|
VersionEdit edit;
|
||||||
DeletionState deletion_state(true);
|
DeletionState deletion_state(true);
|
||||||
|
@ -104,6 +104,9 @@ class DB {
|
|||||||
// that modify data, like put/delete, will return error.
|
// that modify data, like put/delete, will return error.
|
||||||
// If the db is opened in read only mode, then no compactions
|
// If the db is opened in read only mode, then no compactions
|
||||||
// will happen.
|
// will happen.
|
||||||
|
// TODO(icanadi): implement OpenForReadOnly that specifies column families.
|
||||||
|
// User can open DB in read-only mode even if not specifying all column
|
||||||
|
// families
|
||||||
static Status OpenForReadOnly(const Options& options,
|
static Status OpenForReadOnly(const Options& options,
|
||||||
const std::string& name, DB** dbptr,
|
const std::string& name, DB** dbptr,
|
||||||
bool error_if_log_file_exist = false);
|
bool error_if_log_file_exist = false);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user