@ -32,9 +32,9 @@ Status DBImpl::DisableFileDeletions() {
MutexLock l ( & mutex_ ) ;
+ + disable_delete_obsolete_files_ ;
if ( disable_delete_obsolete_files_ = = 1 ) {
Log ( options_ . info_log , " File Deletions Disabled " ) ;
Log ( db_ options_. info_log , " File Deletions Disabled " ) ;
} else {
Log ( options_ . info_log ,
Log ( db_ options_. info_log ,
" File Deletions Disabled, but already disabled. Counter: %d " ,
disable_delete_obsolete_files_ ) ;
}
@ -53,11 +53,11 @@ Status DBImpl::EnableFileDeletions(bool force) {
- - disable_delete_obsolete_files_ ;
}
if ( disable_delete_obsolete_files_ = = 0 ) {
Log ( options_ . info_log , " File Deletions Enabled " ) ;
Log ( db_ options_. info_log , " File Deletions Enabled " ) ;
should_purge_files = true ;
FindObsoleteFiles ( deletion_state , true ) ;
} else {
Log ( options_ . info_log ,
Log ( db_ options_. info_log ,
" File Deletions Enable, but not really enabled. Counter: %d " ,
disable_delete_obsolete_files_ ) ;
}
@ -65,7 +65,7 @@ Status DBImpl::EnableFileDeletions(bool force) {
if ( should_purge_files ) {
PurgeObsoleteFiles ( deletion_state ) ;
}
LogFlush ( options_ . info_log ) ;
LogFlush ( db_ options_. info_log ) ;
return Status : : OK ( ) ;
}
@ -98,7 +98,7 @@ Status DBImpl::GetLiveFiles(std::vector<std::string>& ret,
if ( ! status . ok ( ) ) {
mutex_ . Unlock ( ) ;
Log ( options_ . info_log , " Cannot Flush data %s \n " ,
Log ( db_ options_. info_log , " Cannot Flush data %s \n " ,
status . ToString ( ) . c_str ( ) ) ;
return status ;
}
@ -136,7 +136,7 @@ Status DBImpl::GetSortedWalFiles(VectorLogPtr& files) {
Status s ;
// list wal files in main db dir.
VectorLogPtr logs ;
s = GetSortedWalsOfType ( options_ . wal_dir , logs , kAliveLogFile ) ;
s = GetSortedWalsOfType ( db_ options_. wal_dir , logs , kAliveLogFile ) ;
if ( ! s . ok ( ) ) {
return s ;
}
@ -149,7 +149,7 @@ Status DBImpl::GetSortedWalFiles(VectorLogPtr& files) {
files . clear ( ) ;
// list wal files in archive dir.
std : : string archivedir = ArchivalDirectory ( options_ . wal_dir ) ;
std : : string archivedir = ArchivalDirectory ( db_ options_. wal_dir ) ;
if ( env_ - > FileExists ( archivedir ) ) {
s = GetSortedWalsOfType ( archivedir , files , kArchivedLogFile ) ;
if ( ! s . ok ( ) ) {
@ -160,7 +160,7 @@ Status DBImpl::GetSortedWalFiles(VectorLogPtr& files) {
uint64_t latest_archived_log_number = 0 ;
if ( ! files . empty ( ) ) {
latest_archived_log_number = files . back ( ) - > LogNumber ( ) ;
Log ( options_ . info_log , " Latest Archived log: % " PRIu64 ,
Log ( db_ options_. info_log , " Latest Archived log: % " PRIu64 ,
latest_archived_log_number ) ;
}
@ -173,7 +173,7 @@ Status DBImpl::GetSortedWalFiles(VectorLogPtr& files) {
// same log in both db dir and archived dir. Simply
// ignore the one in db dir. Note that, if we read
// archived dir first, we would have missed the log file.
Log ( options_ . info_log , " %s already moved to archive " ,
Log ( db_ options_. info_log , " %s already moved to archive " ,
log - > PathName ( ) . c_str ( ) ) ;
}
}