Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add more tests to ASSERT_STATUS_CHECKED (4) #7718

Closed

Conversation

adamretter
Copy link
Collaborator

Fourth batch of adding more tests to ASSERT_STATUS_CHECKED.

  • db_range_del_test
  • db_write_test
  • random_access_file_reader_test
  • merge_test
  • external_sst_file_test
  • write_buffer_manager_test
  • stringappend_test
  • deletefile_test

db/forward_iterator.cc Outdated Show resolved Hide resolved
db/merge_test.cc Outdated Show resolved Hide resolved
db/external_sst_file_test.cc Outdated Show resolved Hide resolved
db/deletefile_test.cc Show resolved Hide resolved
Comment on lines 577 to 582

// The status will never be written or read and this
// is needed to avoid ASSERT_STATUS_CHECKED failure
// when the memtable_write_group is free'd
memtable_write_group.status.PermitUncheckedError();

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we just do this in the constructor since this is effectively an unused status?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I felt that this was likely specific to just how it is used here... What do you think?

db/db_impl/db_impl.cc Show resolved Hide resolved
@adamretter adamretter force-pushed the assert-status-checked-4 branch 2 times, most recently from 6dc26f1 to 8751e52 Compare December 8, 2020 22:26
@siying siying requested review from siying and removed request for pdillinger December 21, 2020 19:33
@@ -1307,6 +1321,7 @@ TEST_F(DBRangeDelTest, UntruncatedTombstoneDoesNotDeleteNewerKey) {

auto get_key_count = [this]() -> int {
auto* iter = db_->NewIterator(ReadOptions());
assert(iter->status().ok());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not ASSERT_OK()? If it doesn't work how about EXPECT_OK()?

if (!TryMerge(&aligned_reqs.back(), r)) {
if (i == 0) {
// head
aligned_reqs.push_back(r);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moving this into the loop doesn't seem to be relevant to this PR. Whether it makes it easier to read is arguable and the performance won't change much but doesn't seem to improve much either. So I would suggest we separate this change.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems to be for narrowing down the case requiring r.status.PermitUncheckedError();

Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@siying has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 81592d9.

facebook-github-bot pushed a commit that referenced this pull request Jan 6, 2021
…7838)

Summary:
The IOStatus of TableBuilder is returned by copy the io status from builder->io_status(). pr #7718 swallowed the io status and it will cause the write IO error become non-retryable and no auto resume logic will handle it. Roll back to previous implementation.

Pull Request resolved: #7838

Test Plan: make check

Reviewed By: ajkr

Differential Revision: D25795387

Pulled By: zhichao-cao

fbshipit-source-id: bc35e69e0b71aa4148a6ed76f073357041b8e372
codingrhythm pushed a commit to SafetyCulture/rocksdb that referenced this pull request Mar 5, 2021
Summary:
Fourth batch of adding more tests to ASSERT_STATUS_CHECKED.

* db_range_del_test
* db_write_test
* random_access_file_reader_test
* merge_test
* external_sst_file_test
* write_buffer_manager_test
* stringappend_test
* deletefile_test

Pull Request resolved: facebook#7718

Reviewed By: pdillinger

Differential Revision: D25671608

fbshipit-source-id: 687a794e98a9e0cd5428ead9898ef05ced987c31
codingrhythm pushed a commit to SafetyCulture/rocksdb that referenced this pull request Mar 5, 2021
…acebook#7838)

Summary:
The IOStatus of TableBuilder is returned by copy the io status from builder->io_status(). pr facebook#7718 swallowed the io status and it will cause the write IO error become non-retryable and no auto resume logic will handle it. Roll back to previous implementation.

Pull Request resolved: facebook#7838

Test Plan: make check

Reviewed By: ajkr

Differential Revision: D25795387

Pulled By: zhichao-cao

fbshipit-source-id: bc35e69e0b71aa4148a6ed76f073357041b8e372
levichen94 pushed a commit to bytedance/terarkdb that referenced this pull request Jun 18, 2021
Summary:
Fourth batch of adding more tests to ASSERT_STATUS_CHECKED.

* db_range_del_test
* db_write_test
* random_access_file_reader_test
* merge_test
* external_sst_file_test
* write_buffer_manager_test
* stringappend_test
* deletefile_test

Pull Request resolved: facebook/rocksdb#7718

Reviewed By: pdillinger

Differential Revision: D25671608

fbshipit-source-id: 687a794e98a9e0cd5428ead9898ef05ced987c31
Signed-off-by: Changlong Chen <levisonchen@live.cn>
mm304321141 pushed a commit to bytedance/terarkdb that referenced this pull request Jun 23, 2021
Summary:
Fourth batch of adding more tests to ASSERT_STATUS_CHECKED.

* db_range_del_test
* db_write_test
* random_access_file_reader_test
* merge_test
* external_sst_file_test
* write_buffer_manager_test
* stringappend_test
* deletefile_test

Pull Request resolved: facebook/rocksdb#7718

Reviewed By: pdillinger

Differential Revision: D25671608

fbshipit-source-id: 687a794e98a9e0cd5428ead9898ef05ced987c31
Signed-off-by: Changlong Chen <levisonchen@live.cn>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed RocksDB bugs CLA Signed Merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants