提交 5de333fd 编写于 作者: A Adam Retter 提交者: Facebook GitHub Bot

Add db_test2 to to ASSERT_STATUS_CHECKED (#8640)

Summary:
This is the `db_test2` parts of https://github.com/facebook/rocksdb/pull/7737 reworked on the latest HEAD.

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

Reviewed By: akankshamahajan15

Differential Revision: D30303684

Pulled By: mrambacher

fbshipit-source-id: 263e2f82d849bde4048b60aed8b31e7deed4706a
上级 9b0a32f8
......@@ -525,7 +525,6 @@ ifdef ASSERT_STATUS_CHECKED
TESTS_FAILING_ASC = \
c_test \
db_test \
db_test2 \
env_test \
range_locking_test \
testutil_test \
......
......@@ -5103,7 +5103,7 @@ Status DBImpl::EndTrace() {
s = tracer_->Close();
tracer_.reset();
} else {
return Status::IOError("No trace file to close");
s = Status::IOError("No trace file to close");
}
return s;
}
......
......@@ -1434,8 +1434,10 @@ Status DBImpl::WriteLevel0TableForRecovery(int job_id, ColumnFamilyData* cfd,
meta.fd.GetFileSize(), s.ToString().c_str());
mutex_.Lock();
io_s.PermitUncheckedError(); // TODO(AR) is this correct, or should we
// return io_s if not ok()?
// TODO(AR) is this ok?
if (!io_s.ok() && s.ok()) {
s = io_s;
}
}
}
ReleaseFileNumberFromPendingOutputs(pending_outputs_inserted_elem);
......
此差异已折叠。
......@@ -403,7 +403,7 @@ class SpecialEnv : public EnvWrapper {
Status Sync() override {
++env_->sync_counter_;
if (env_->corrupt_in_sync_) {
Append(std::string(33000, ' '));
EXPECT_OK(Append(std::string(33000, ' ')));
return Status::IOError("Ingested Sync Failure");
}
if (env_->skip_fsync_) {
......
......@@ -395,7 +395,11 @@ IOStatus SetCurrentFile(FileSystem* fs, const std::string& dbname,
s = directory_to_fsync->Fsync(IOOptions(), nullptr);
}
} else {
fs->DeleteFile(tmp, IOOptions(), nullptr);
fs->DeleteFile(tmp, IOOptions(), nullptr)
.PermitUncheckedError(); // NOTE: PermitUncheckedError is acceptable
// here as we are already handling an error
// case, and this is just a best-attempt
// effort at some cleanup
}
return s;
}
......
......@@ -62,7 +62,9 @@ class BlockFetcher {
cache_options_(cache_options),
memory_allocator_(memory_allocator),
memory_allocator_compressed_(memory_allocator_compressed),
for_compaction_(for_compaction) {}
for_compaction_(for_compaction) {
io_status_.PermitUncheckedError(); // TODO(AR) can we improve on this?
}
IOStatus ReadBlockContents();
CompressionType get_compression_type() const { return compression_type_; }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册