Add ldb_cmd_test to ASSERT_STATUS_CHECKED list (#7499)

Summary:
Add ldb_cmd_test to ASSERT_STATUS_CHECKED list

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

Test Plan: pass ASSERT_STATUS_CHECKED=1 make -j48 ldb_cmd_test

Reviewed By: cheng-chang

Differential Revision: D24086203

Pulled By: zhichao-cao

fbshipit-source-id: 29592202b1d4335e566de15e7937269d98d57841
main
Zhichao Cao 4 years ago committed by Facebook GitHub Bot
parent 002b30c967
commit 4146276885
  1. 1
      Makefile
  2. 21
      db/version_set.cc
  3. 8
      env/mock_env.cc

@ -612,6 +612,7 @@ ifdef ASSERT_STATUS_CHECKED
inlineskiplist_test \
io_posix_test \
iostats_context_test \
ldb_cmd_test \
memkind_kmem_allocator_test \
merger_test \
mock_env_test \

@ -5082,8 +5082,10 @@ Status VersionSet::ReduceNumberOfLevels(const std::string& dbname,
// metadata from Manifest to VersionSet before calling this function.
Status VersionSet::GetLiveFilesChecksumInfo(FileChecksumList* checksum_list) {
// Clean the previously stored checksum information if any.
Status s;
if (checksum_list == nullptr) {
return Status::InvalidArgument("checksum_list is nullptr");
s = Status::InvalidArgument("checksum_list is nullptr");
return s;
}
checksum_list->reset();
@ -5094,13 +5096,22 @@ Status VersionSet::GetLiveFilesChecksumInfo(FileChecksumList* checksum_list) {
for (int level = 0; level < cfd->NumberLevels(); level++) {
for (const auto& file :
cfd->current()->storage_info()->LevelFiles(level)) {
checksum_list->InsertOneFileChecksum(file->fd.GetNumber(),
file->file_checksum,
file->file_checksum_func_name);
s = checksum_list->InsertOneFileChecksum(file->fd.GetNumber(),
file->file_checksum,
file->file_checksum_func_name);
if (!s.ok()) {
break;
}
}
if (!s.ok()) {
break;
}
}
if (!s.ok()) {
break;
}
}
return Status::OK();
return s;
}
Status VersionSet::DumpManifest(Options& options, std::string& dscname,

8
env/mock_env.cc vendored

@ -394,9 +394,11 @@ class TestMemLogger : public Logger {
assert(p <= limit);
const size_t write_size = p - base;
file_->Append(Slice(base, write_size));
flush_pending_ = true;
log_size_ += write_size;
Status s = file_->Append(Slice(base, write_size));
if (s.ok()) {
flush_pending_ = true;
log_size_ += write_size;
}
uint64_t now_micros =
static_cast<uint64_t>(now_tv.tv_sec) * 1000000 + now_tv.tv_usec;
if (now_micros - last_flush_micros_ >= flush_every_seconds_ * 1000000) {

Loading…
Cancel
Save