@ -893,6 +893,7 @@ Status DBImpl::WriteLevel0TableForRecovery(int job_id, ColumnFamilyData* cfd,
const uint64_t current_time = static_cast < uint64_t > ( _current_time ) ;
const uint64_t current_time = static_cast < uint64_t > ( _current_time ) ;
{
{
auto write_hint = cfd - > CalculateSSTWriteHint ( 0 ) ;
mutex_ . Unlock ( ) ;
mutex_ . Unlock ( ) ;
SequenceNumber earliest_write_conflict_snapshot ;
SequenceNumber earliest_write_conflict_snapshot ;
@ -913,7 +914,7 @@ Status DBImpl::WriteLevel0TableForRecovery(int job_id, ColumnFamilyData* cfd,
cfd - > ioptions ( ) - > compression_opts , paranoid_file_checks ,
cfd - > ioptions ( ) - > compression_opts , paranoid_file_checks ,
cfd - > internal_stats ( ) , TableFileCreationReason : : kRecovery ,
cfd - > internal_stats ( ) , TableFileCreationReason : : kRecovery ,
& event_logger_ , job_id , Env : : IO_HIGH , nullptr /* table_properties */ ,
& event_logger_ , job_id , Env : : IO_HIGH , nullptr /* table_properties */ ,
- 1 /* level */ , current_time ) ;
- 1 /* level */ , current_time , write_hint ) ;
LogFlush ( immutable_db_options_ . info_log ) ;
LogFlush ( immutable_db_options_ . info_log ) ;
ROCKS_LOG_DEBUG ( immutable_db_options_ . info_log ,
ROCKS_LOG_DEBUG ( immutable_db_options_ . info_log ,
" [%s] [WriteLevel0TableForRecovery] "
" [%s] [WriteLevel0TableForRecovery] "
@ -1007,6 +1008,7 @@ Status DB::Open(const DBOptions& db_options, const std::string& dbname,
return s ;
return s ;
}
}
impl - > mutex_ . Lock ( ) ;
impl - > mutex_ . Lock ( ) ;
auto write_hint = impl - > CalculateWALWriteHint ( ) ;
// Handles create_if_missing, error_if_exists
// Handles create_if_missing, error_if_exists
s = impl - > Recover ( column_families ) ;
s = impl - > Recover ( column_families ) ;
if ( s . ok ( ) ) {
if ( s . ok ( ) ) {
@ -1022,6 +1024,7 @@ Status DB::Open(const DBOptions& db_options, const std::string& dbname,
LogFileName ( impl - > immutable_db_options_ . wal_dir , new_log_number ) ,
LogFileName ( impl - > immutable_db_options_ . wal_dir , new_log_number ) ,
& lfile , opt_env_options ) ;
& lfile , opt_env_options ) ;
if ( s . ok ( ) ) {
if ( s . ok ( ) ) {
lfile - > SetWriteLifeTimeHint ( write_hint ) ;
lfile - > SetPreallocationBlockSize (
lfile - > SetPreallocationBlockSize (
impl - > GetWalPreallocateBlockSize ( max_write_buffer_size ) ) ;
impl - > GetWalPreallocateBlockSize ( max_write_buffer_size ) ) ;
{
{