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

test(DM): add check log contain to safe-mode integration test #7152

Merged
merged 6 commits into from
Sep 21, 2022

Conversation

okJiang
Copy link
Member

@okJiang okJiang commented Sep 21, 2022

What problem does this PR solve?

Issue Number: ref #4159, close #7099

What is changed and how it works?

  • the worker1 didn't enter sync status and execute dml, after check_diff before kill_worker, so its SafeModeExitPoint is yet same as its GlobalCheckpoint(beginPosition). This is the unstable reason.

Check List

Tests

  • Integration test

Questions

Will it cause performance regression or break compatibility?
Do you need to update user documentation, design documentation or monitoring documentation?

Release note

`None`

@ti-chi-bot
Copy link
Member

ti-chi-bot commented Sep 21, 2022

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • GMHDBJD
  • buchuitoudegou

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

The full list of commands accepted by this bot can be found here.

Reviewer can indicate their review by submitting an approval review.
Reviewer can cancel approval by submitting a request changes review.

@ti-chi-bot ti-chi-bot added release-note-none Denotes a PR that doesn't merit a release note. do-not-merge/needs-triage-completed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Sep 21, 2022
@okJiang
Copy link
Member Author

okJiang commented Sep 21, 2022

/run-dm-integration-test

@okJiang
Copy link
Member Author

okJiang commented Sep 21, 2022

/area dm
/cherry-pick release-6.3

@ti-chi-bot
Copy link
Member

@okJiang: once the present PR merges, I will cherry-pick it on top of release-6.3 in the new PR and assign it to you.

In response to this:

/area dm
/cherry-pick release-6.3

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.

@ti-chi-bot ti-chi-bot added the area/dm Issues or PRs related to DM. label Sep 21, 2022
@@ -206,6 +206,9 @@ function safe_mode_duration() {
dmctl_operate_source create $WORK_DIR/source2.yaml $SOURCE_ID2

dmctl_start_task "$cur/conf/dm-task-safe-mode-duration.yaml" "--remove-meta"
# Worker1 need to start relay, so it is slow.
# It is possible that worker1 has not loaded before check diff.
sleep 3
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think sleep can make it stable, you may use check_log_contains_with_retry to make sure test enter a centain state.

@okJiang
Copy link
Member Author

okJiang commented Sep 21, 2022

/type cherry-pick-for-release-6.3

@ti-chi-bot ti-chi-bot added the type/cherry-pick-for-release-6.3 This PR is cherry-picked to release-6.3 from a source PR. label Sep 21, 2022
@okJiang
Copy link
Member Author

okJiang commented Sep 21, 2022

/run-dm-integration-test

@@ -211,6 +211,8 @@ function safe_mode_duration() {
run_sql_file $cur/data/db1.increment.sql $MYSQL_HOST1 $MYSQL_PORT1 $MYSQL_PASSWORD1
run_sql_file $cur/data/db2.increment.sql $MYSQL_HOST2 $MYSQL_PORT2 $MYSQL_PASSWORD2

# make sure worker1 enter to sync status, and complete one dml
check_log_contain_with_retry "alter table t1 add column age int" $WORK_DIR/worker1/log/dm-worker.log
Copy link
Contributor

Choose a reason for hiding this comment

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

The code change doesn't match the PR title. So which one should be changed?

Copy link
Member Author

Choose a reason for hiding this comment

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

it is working in progress. I will update it

@okJiang okJiang changed the title test(DM): add sleep to safe-mode integration test [WIP] test(DM): add sleep to safe-mode integration test Sep 21, 2022
@ti-chi-bot ti-chi-bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Sep 21, 2022
@okJiang
Copy link
Member Author

okJiang commented Sep 21, 2022

/run-dm-integration-test

@okJiang
Copy link
Member Author

okJiang commented Sep 21, 2022

/cc @GMHDBJD @lance6716

@okJiang
Copy link
Member Author

okJiang commented Sep 21, 2022

/run-all-tests

@okJiang okJiang changed the title [WIP] test(DM): add sleep to safe-mode integration test test(DM): add check log contain to safe-mode integration test Sep 21, 2022
@ti-chi-bot ti-chi-bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Sep 21, 2022
@okJiang
Copy link
Member Author

okJiang commented Sep 21, 2022

/run-check-issue-triage-complete

1 similar comment
@okJiang
Copy link
Member Author

okJiang commented Sep 21, 2022

/run-check-issue-triage-complete

Copy link
Contributor

@GMHDBJD GMHDBJD left a comment

Choose a reason for hiding this comment

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

LGTM

@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Sep 21, 2022
@okJiang
Copy link
Member Author

okJiang commented Sep 21, 2022

/run-verify

@ti-chi-bot ti-chi-bot added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Sep 21, 2022
@okJiang
Copy link
Member Author

okJiang commented Sep 21, 2022

/merge

@ti-chi-bot
Copy link
Member

@okJiang: /merge is only allowed for the committers, you can assign this pull request to the committer in list by filling /assign @committer in the comment to help merge this pull request.

In response to this:

/merge

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.

@GMHDBJD
Copy link
Contributor

GMHDBJD commented Sep 21, 2022

/merge

@ti-chi-bot
Copy link
Member

This pull request has been accepted and is ready to merge.

Commit hash: 97981a0

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Sep 21, 2022
@okJiang
Copy link
Member Author

okJiang commented Sep 21, 2022

/lable needs-cherry-pick-release-6.3

@okJiang
Copy link
Member Author

okJiang commented Sep 21, 2022

/check-issue-triage-complete

@ti-chi-bot ti-chi-bot added needs-cherry-pick-release-6.3 Should cherry pick this PR to release-6.3 branch. and removed do-not-merge/needs-triage-completed labels Sep 21, 2022
@ti-chi-bot
Copy link
Member

@okJiang: Your PR was out of date, I have automatically updated it for you.

At the same time I will also trigger all tests for you:

/run-all-tests

If the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes.

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.

@okJiang
Copy link
Member Author

okJiang commented Sep 21, 2022

/remove-type cherry-pick-for-release-6.3

@ti-chi-bot ti-chi-bot removed the type/cherry-pick-for-release-6.3 This PR is cherry-picked to release-6.3 from a source PR. label Sep 21, 2022
@okJiang
Copy link
Member Author

okJiang commented Sep 21, 2022

/run-verify

@okJiang
Copy link
Member Author

okJiang commented Sep 21, 2022

/run-engine-integration-test

1 similar comment
@okJiang
Copy link
Member Author

okJiang commented Sep 21, 2022

/run-engine-integration-test

@ti-chi-bot ti-chi-bot merged commit 69c6189 into pingcap:master Sep 21, 2022
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created: #7163.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/dm Issues or PRs related to DM. needs-cherry-pick-release-6.3 Should cherry pick this PR to release-6.3 branch. release-note-none Denotes a PR that doesn't merit a release note. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

unstable integration test dm/safemode
5 participants