-
Notifications
You must be signed in to change notification settings - Fork 411
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
test: Add tests case when deltaMergeBySplit + { flushCache | split } occurs simultaneously (#5454) #5486
test: Add tests case when deltaMergeBySplit + { flushCache | split } occurs simultaneously (#5454) #5486
Conversation
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by submitting an approval review. |
…occurs simultaneously (pingcap#5454) Signed-off-by: Wish <[email protected]>
f51acbd
to
b629078
Compare
Signed-off-by: Wish <[email protected]>
Signed-off-by: Wish <[email protected]>
/run-all-tests |
Coverage for changed files
Coverage summary
full coverage report (for internal network access only) |
/merge |
@breezewish: It seems you want to merge this PR, I will help you trigger all the tests: /run-all-tests You only need to trigger If you have any questions about the PR merge process, please refer to pr process. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository. |
This pull request has been accepted and is ready to merge. Commit hash: c522c2b
|
Coverage for changed files
Coverage summary
full coverage report (for internal network access only) |
This is an automated cherry-pick of #5454
What problem does this PR solve?
Issue Number: ref #5409
Problem Summary: For now we lack some tests to test the behavior when multiple operations occurred at the same time.
What is changed and how it works?
Introduced a new facility called
SyncPoint
, which can be used to control the arbitrary business logical flow to suspend and continue.Added or modified existing ManualCompaction tests based on the new
SyncPoint
:Modified: BasicManualCompactTest/DuplicatedLogicalId
Previously this test uses sleep(500ms) to expect specific code logic is finished. Now this sleep is substituted with SyncPoint, so that expected code logic is always finished and the test can continue without waiting for useless time.
Added: DeltaMergeStoreMergeDeltaBySegmentTest/RetryByFlushCache
Added: DeltaMergeStoreMergeDeltaBySegmentTest/RetryBySplit
The two new cases above tests whether everything works fine when there are mergeDeltaBySplit and flushCache (or split) happening simultaneously, based on the SyncPoint.
Added more guards in gtest_main:
Failures are now turned into exceptions by default, so that when writing ASSERT in sub-functions it will break the test immediately. This is particularly useful in SyncPoint tests, as when there are failures in previous sync point steps, it is very likely that the rest step will not work as expected, result in infinite wait. By turning into exceptions, we these test cases fail fast.
Added stack output when the program is unexpected terminated in fault signals like SIG_ABORT (and also
std::terminate
). This helps locate the code of triggering these faults.Check List
Tests
Side effects
Documentation
Release note