Ignore the OnAddFile Status for SSTFileManager (#7826)
Summary: The returned Status is ignored here as some stress tests are failing, presumably when attempting to add an empty file. Pull Request resolved: https://github.com/facebook/rocksdb/pull/7826 Reviewed By: jay-zhuang Differential Revision: D25742931 fbshipit-source-id: a1fcd620d9472993a009929306dfc421f93eb43b
This commit is contained in:
parent
61e324422e
commit
0bad2b4308
@ -284,7 +284,10 @@ Status DBImpl::FlushMemTableToOutputFile(
|
|||||||
// Notify sst_file_manager that a new file was added
|
// Notify sst_file_manager that a new file was added
|
||||||
std::string file_path = MakeTableFileName(
|
std::string file_path = MakeTableFileName(
|
||||||
cfd->ioptions()->cf_paths[0].path, file_meta.fd.GetNumber());
|
cfd->ioptions()->cf_paths[0].path, file_meta.fd.GetNumber());
|
||||||
s = sfm->OnAddFile(file_path);
|
// TODO (PR7798). We should only add the file to the FileManager if it
|
||||||
|
// exists. Otherwise, some tests may fail. Ignore the error in the
|
||||||
|
// interim.
|
||||||
|
sfm->OnAddFile(file_path).PermitUncheckedError();
|
||||||
if (sfm->IsMaxAllowedSpaceReached()) {
|
if (sfm->IsMaxAllowedSpaceReached()) {
|
||||||
Status new_bg_error =
|
Status new_bg_error =
|
||||||
Status::SpaceLimit("Max allowed space was reached");
|
Status::SpaceLimit("Max allowed space was reached");
|
||||||
@ -627,7 +630,10 @@ Status DBImpl::AtomicFlushMemTablesToOutputFiles(
|
|||||||
if (sfm) {
|
if (sfm) {
|
||||||
std::string file_path = MakeTableFileName(
|
std::string file_path = MakeTableFileName(
|
||||||
cfds[i]->ioptions()->cf_paths[0].path, file_meta[i].fd.GetNumber());
|
cfds[i]->ioptions()->cf_paths[0].path, file_meta[i].fd.GetNumber());
|
||||||
s = sfm->OnAddFile(file_path);
|
// TODO (PR7798). We should only add the file to the FileManager if it
|
||||||
|
// exists. Otherwise, some tests may fail. Ignore the error in the
|
||||||
|
// interim.
|
||||||
|
sfm->OnAddFile(file_path).PermitUncheckedError();
|
||||||
if (sfm->IsMaxAllowedSpaceReached() &&
|
if (sfm->IsMaxAllowedSpaceReached() &&
|
||||||
error_handler_.GetBGError().ok()) {
|
error_handler_.GetBGError().ok()) {
|
||||||
Status new_bg_error =
|
Status new_bg_error =
|
||||||
|
Loading…
Reference in New Issue
Block a user