-
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 (5) #7737
Conversation
0ae67fe
to
0a04e34
Compare
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.
Thanks for all of the hard work in this PR. That is quite a few places to check.
Generally, it is fine. Questions on what to do with status in a thread and where to check the status in the iterator -- I prefer as one of the "last" things or after a Valid() check.
assert(versions); | ||
assert(versions->GetColumnFamilySet()); |
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 am not saying if these changes are right or wrong (I prefer the latter) but I hit issues with similar changes with TSAN/ASAN before I think.
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.
Hmm... I just wanted things to be consistent. It seems strange to sometimes use assert
and at other times the GTest ASSERT* statements.
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.
These apparently useless non-nullity checks are hints for clang-analyze not to generate false reports. I don't believe clang-analyze understands GTest ASSERT*. (I always recommend "why" comments where justification is not clear.)
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.
@pdillinger So should these be changed back? There are many changes like these in lots of tests - does that also then mean that we need to change these in all tests?
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.
Consider the CircleCI build-linux-clang10-clang-analyze to be authoritative. If it's happy, we should be good. (Hopefully our internal clang-analyze runs will agree with it; we can worry about any disagreements between the two as they happen.)
f16960c
to
4042135
Compare
f3e58e0
to
adc01cd
Compare
28bd34d
to
bf01a6b
Compare
bf01a6b
to
3df1201
Compare
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.
@akankshamahajan15 has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
@adamretter DBTest.ThreadLocalPtrDeadlock is failing in ASAN check and ASSERT_STATUS_CHECKED. |
@adamretter Hi Adam, were you able to resolve the failure? |
@adamretter, Hi Adam. It's being a long time this PR has been in pending queue. Is there any update on this? |
Hi @akankshamahajan15 I rebased this PR this morning atop HEAD. I spent some time comparing and running the tests before and after rebase. Unfortunately after rebase (after resolving the merge conflicts) it now shows that there are several more failing tests than before, this is in part due to two things:
Is it best to push the rebased version of this PR and start resolving the new failures from here? Another option could be to split this PR into two, one for db_test and one for db_test2 as they are both quite large. What do you think? Let me know and I am happy to try and proceed. p.s. the original issue |
Thanks a lot for taking it up. I think we If we can separate the two tests, we can atleast land one test otherwise more tests will keep getting added in future. Also we have techdebt week next week so let me know if you need any help. I can take a look at DBTest.ThreadLocalPtrDeadlock next week. It would be great if we can land this one. |
I am also willing to look into these next week, but would rather not re-invent the wheel. If we can get whatever is passing into master (without the ASC-okay flag), that would be great. |
Summary: This is the `db_test2` parts of facebook/rocksdb#7737 reworked on the latest HEAD. Pull Request resolved: facebook/rocksdb#8640 Reviewed By: akankshamahajan15 Differential Revision: D30303684 Pulled By: mrambacher fbshipit-source-id: 263e2f82d849bde4048b60aed8b31e7deed4706a
Fifth batch of adding more tests to ASSERT_STATUS_CHECKED.
Requires #7819 for all tests to pass.