Get DBTest passing Assert Status Checked (#7737)

Summary:
Closes https://github.com/facebook/rocksdb/pull/7737

Pull Request resolved: https://github.com/facebook/rocksdb/pull/9231

Reviewed By: hx235

Differential Revision: D32978332

Pulled By: pdillinger

fbshipit-source-id: b28900b685d60c668529a90dbaa8e1b357b28f76
main
Si Ke 3 years ago committed by Facebook GitHub Bot
parent c879910102
commit 79f4a04ee3
  1. 1
      Makefile
  2. 13
      db/db_impl/db_impl_experimental.cc
  3. 494
      db/db_test.cc

@ -569,7 +569,6 @@ ifdef ASSERT_STATUS_CHECKED
# TODO: finish fixing all tests to pass this check
TESTS_FAILING_ASC = \
c_test \
db_test \
env_test \
range_locking_test \
testutil_test \

@ -76,7 +76,8 @@ Status DBImpl::PromoteL0(ColumnFamilyHandle* column_family, int target_level) {
"PromoteL0 FAILED. Target level %d does not exist\n",
target_level);
job_context.Clean();
return Status::InvalidArgument("Target level does not exist");
status = Status::InvalidArgument("Target level does not exist");
return status;
}
// Sort L0 files by range.
@ -96,7 +97,9 @@ Status DBImpl::PromoteL0(ColumnFamilyHandle* column_family, int target_level) {
"PromoteL0 FAILED. File %" PRIu64 " being compacted\n",
f->fd.GetNumber());
job_context.Clean();
return Status::InvalidArgument("PromoteL0 called during L0 compaction");
status =
Status::InvalidArgument("PromoteL0 called during L0 compaction");
return status;
}
if (i == 0) continue;
@ -107,7 +110,8 @@ Status DBImpl::PromoteL0(ColumnFamilyHandle* column_family, int target_level) {
" have overlapping ranges\n",
prev_f->fd.GetNumber(), f->fd.GetNumber());
job_context.Clean();
return Status::InvalidArgument("L0 has overlapping files");
status = Status::InvalidArgument("L0 has overlapping files");
return status;
}
}
@ -117,9 +121,10 @@ Status DBImpl::PromoteL0(ColumnFamilyHandle* column_family, int target_level) {
ROCKS_LOG_INFO(immutable_db_options_.info_log,
"PromoteL0 FAILED. Level %d not empty\n", level);
job_context.Clean();
return Status::InvalidArgument(
status = Status::InvalidArgument(
"All levels up to target_level "
"must be empty");
return status;
}
}

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save