@ -407,7 +407,7 @@ Status DBImpl::NewDB() {
{
{
unique_ptr < WritableFile > file ;
unique_ptr < WritableFile > file ;
EnvOptions env_options = env_ - > OptimizeForManifestWrite ( env_options_ ) ;
EnvOptions env_options = env_ - > OptimizeForManifestWrite ( env_options_ ) ;
s = env_ - > NewWritableFile ( manifest , & file , env_options ) ;
s = NewWritableFile ( env_ , manifest , & file , env_options ) ;
if ( ! s . ok ( ) ) {
if ( ! s . ok ( ) ) {
return s ;
return s ;
}
}
@ -4074,9 +4074,9 @@ Status DBImpl::SwitchMemtable(ColumnFamilyData* cfd, WriteContext* context) {
if ( creating_new_log ) {
if ( creating_new_log ) {
EnvOptions opt_env_opt =
EnvOptions opt_env_opt =
env_ - > OptimizeForLogWrite ( env_options_ , db_options_ ) ;
env_ - > OptimizeForLogWrite ( env_options_ , db_options_ ) ;
s = env_ - > NewWritableFile (
s = NewWritableFile ( env_ ,
LogFileName ( db_options_ . wal_dir , new_log_number ) , & lfile ,
LogFileName ( db_options_ . wal_dir , new_log_number ) ,
opt_env_opt ) ;
& lfile , opt_env_opt ) ;
if ( s . ok ( ) ) {
if ( s . ok ( ) ) {
// Our final size should be less than write_buffer_size
// Our final size should be less than write_buffer_size
// (compression, etc) but err on the side of caution.
// (compression, etc) but err on the side of caution.
@ -4692,9 +4692,9 @@ Status DB::Open(const DBOptions& db_options, const std::string& dbname,
EnvOptions soptions ( db_options ) ;
EnvOptions soptions ( db_options ) ;
EnvOptions opt_env_options =
EnvOptions opt_env_options =
impl - > db_options_ . env - > OptimizeForLogWrite ( soptions , impl - > db_options_ ) ;
impl - > db_options_ . env - > OptimizeForLogWrite ( soptions , impl - > db_options_ ) ;
s = impl - > db_options_ . env - > NewWritableFile (
s = NewWritableFile ( impl - > db_options_ . env ,
LogFileName ( impl - > db_options_ . wal_dir , new_log_number ) , & lfile ,
LogFileName ( impl - > db_options_ . wal_dir , new_log_number ) ,
opt_env_options ) ;
& lfile , opt_env_options ) ;
if ( s . ok ( ) ) {
if ( s . ok ( ) ) {
lfile - > SetPreallocationBlockSize ( 1.1 * max_write_buffer_size ) ;
lfile - > SetPreallocationBlockSize ( 1.1 * max_write_buffer_size ) ;
impl - > logfile_number_ = new_log_number ;
impl - > logfile_number_ = new_log_number ;