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
This commit is contained in:
parent
9b0a32f802
commit
5de333fd99
1
Makefile
1
Makefile
@ -525,7 +525,6 @@ ifdef ASSERT_STATUS_CHECKED
|
|||||||
TESTS_FAILING_ASC = \
|
TESTS_FAILING_ASC = \
|
||||||
c_test \
|
c_test \
|
||||||
db_test \
|
db_test \
|
||||||
db_test2 \
|
|
||||||
env_test \
|
env_test \
|
||||||
range_locking_test \
|
range_locking_test \
|
||||||
testutil_test \
|
testutil_test \
|
||||||
|
@ -5103,7 +5103,7 @@ Status DBImpl::EndTrace() {
|
|||||||
s = tracer_->Close();
|
s = tracer_->Close();
|
||||||
tracer_.reset();
|
tracer_.reset();
|
||||||
} else {
|
} else {
|
||||||
return Status::IOError("No trace file to close");
|
s = Status::IOError("No trace file to close");
|
||||||
}
|
}
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
@ -1434,8 +1434,10 @@ Status DBImpl::WriteLevel0TableForRecovery(int job_id, ColumnFamilyData* cfd,
|
|||||||
meta.fd.GetFileSize(), s.ToString().c_str());
|
meta.fd.GetFileSize(), s.ToString().c_str());
|
||||||
mutex_.Lock();
|
mutex_.Lock();
|
||||||
|
|
||||||
io_s.PermitUncheckedError(); // TODO(AR) is this correct, or should we
|
// TODO(AR) is this ok?
|
||||||
// return io_s if not ok()?
|
if (!io_s.ok() && s.ok()) {
|
||||||
|
s = io_s;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ReleaseFileNumberFromPendingOutputs(pending_outputs_inserted_elem);
|
ReleaseFileNumberFromPendingOutputs(pending_outputs_inserted_elem);
|
||||||
|
453
db/db_test2.cc
453
db/db_test2.cc
File diff suppressed because it is too large
Load Diff
@ -403,7 +403,7 @@ class SpecialEnv : public EnvWrapper {
|
|||||||
Status Sync() override {
|
Status Sync() override {
|
||||||
++env_->sync_counter_;
|
++env_->sync_counter_;
|
||||||
if (env_->corrupt_in_sync_) {
|
if (env_->corrupt_in_sync_) {
|
||||||
Append(std::string(33000, ' '));
|
EXPECT_OK(Append(std::string(33000, ' ')));
|
||||||
return Status::IOError("Ingested Sync Failure");
|
return Status::IOError("Ingested Sync Failure");
|
||||||
}
|
}
|
||||||
if (env_->skip_fsync_) {
|
if (env_->skip_fsync_) {
|
||||||
|
@ -395,7 +395,11 @@ IOStatus SetCurrentFile(FileSystem* fs, const std::string& dbname,
|
|||||||
s = directory_to_fsync->Fsync(IOOptions(), nullptr);
|
s = directory_to_fsync->Fsync(IOOptions(), nullptr);
|
||||||
}
|
}
|
||||||
} else {
|
} 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;
|
return s;
|
||||||
}
|
}
|
||||||
|
@ -62,7 +62,9 @@ class BlockFetcher {
|
|||||||
cache_options_(cache_options),
|
cache_options_(cache_options),
|
||||||
memory_allocator_(memory_allocator),
|
memory_allocator_(memory_allocator),
|
||||||
memory_allocator_compressed_(memory_allocator_compressed),
|
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();
|
IOStatus ReadBlockContents();
|
||||||
CompressionType get_compression_type() const { return compression_type_; }
|
CompressionType get_compression_type() const { return compression_type_; }
|
||||||
|
Loading…
Reference in New Issue
Block a user