Skip to content

Commit ac166ad

Browse files
committed
There is no need to enforce that all sst files are cached on local SSD.
Summary: Remove the over-arching check in SanitizeDirectory that disallowed keep_local_sst_files to be false when there is no destination bucket Test Plan: run all unit tests Reviewers: hieu Reviewed By: hieu Differential Revision: https://rockset.phacility.com/D6464
1 parent 33cbf8b commit ac166ad

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

cloud/cloud_env_impl.cc

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1376,7 +1376,7 @@ Status CloudEnvImpl::SanitizeDirectory(const DBOptions& options,
13761376
return st;
13771377
}
13781378

1379-
// If there is no destination bucket, then we need to suck in all sst files
1379+
// If there is no destination bucket, then we prefer to suck in all sst files
13801380
// from source bucket at db startup time. We do this by setting max_open_files
13811381
// = -1
13821382
if (!HasDestBucket()) {
@@ -1389,15 +1389,13 @@ Status CloudEnvImpl::SanitizeDirectory(const DBOptions& options,
13891389
GetSrcObjectPath().c_str(), local_name.c_str());
13901390
}
13911391
if (!cloud_env_options.keep_local_sst_files && !read_only) {
1392-
Log(InfoLogLevel::ERROR_LEVEL, info_log_,
1393-
"[cloud_env_impl] SanitizeDirectory error. "
1394-
" No destination bucket specified. Set options.keep_local_sst_files "
1395-
"= true to copy in all sst files from src bucket %s into local dir "
1396-
"%s",
1392+
Log(InfoLogLevel::INFO_LEVEL, info_log_,
1393+
"[cloud_env_impl] SanitizeDirectory info. "
1394+
" No destination bucket specified and options.keep_local_sst_files "
1395+
"is false. Existing sst files from src bucket %s will not be "
1396+
" downloaded into local dir but newly created sst files will "
1397+
" remain in local dir %s",
13971398
GetSrcObjectPath().c_str(), local_name.c_str());
1398-
return Status::InvalidArgument(
1399-
"No destination bucket. "
1400-
"Set options.keep_local_sst_files = true");
14011399
}
14021400
}
14031401

0 commit comments

Comments
 (0)