-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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
Conversation
db/db_impl/db_impl_write.cc
Outdated
|
||
// 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(); | ||
|
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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?
6dc26f1
to
8751e52
Compare
2f50ac0
to
cb46dc3
Compare
cb46dc3
to
9ff22cb
Compare
@@ -1307,6 +1321,7 @@ TEST_F(DBRangeDelTest, UntruncatedTombstoneDoesNotDeleteNewerKey) { | |||
|
|||
auto get_key_count = [this]() -> int { | |||
auto* iter = db_->NewIterator(ReadOptions()); | |||
assert(iter->status().ok()); |
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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();
There was a problem hiding this 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.
This pull request has been merged in 81592d9. |
…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
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
…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
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>
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>
Fourth batch of adding more tests to ASSERT_STATUS_CHECKED.