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

Fix integration test of parallel prehandling #8245

Merged
merged 9 commits into from
Oct 26, 2023

Conversation

CalvinNeo
Copy link
Member

@CalvinNeo CalvinNeo commented Oct 25, 2023

What problem does this PR solve?

Issue Number: close #8246

Problem Summary:

The problem is when a retryable exception is thrown in a thread, it will notify other thread to abort. As a result, other thread will abort. If the abort result is captured before the retryable result by head split, it will abort directly without retry.

What is changed and how it works?

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Documentation

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Changes MySQL compatibility

Release note

None

Signed-off-by: CalvinNeo <calvinneo1995@gmail.com>
@ti-chi-bot ti-chi-bot bot added do-not-merge/needs-linked-issue release-note-none Denotes a PR that doesn't merit a release note. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed do-not-merge/needs-linked-issue labels Oct 25, 2023
@ti-chi-bot ti-chi-bot bot added needs-1-more-lgtm Indicates a PR needs 1 more LGTM. approved labels Oct 25, 2023
@CalvinNeo
Copy link
Member Author

/run-all-tests

1 similar comment
@CalvinNeo
Copy link
Member Author

/run-all-tests

@@ -189,7 +181,10 @@ static inline std::tuple<ReadFromStreamResult, PrehandleResult> executeTransform
if (stream->isAbort())
{
stream->cancel();
res = ReadFromStreamResult{.error = ReadFromStreamError::Aborted, .extra_msg = "", .region = new_region};
res = ReadFromStreamResult{
Copy link
Member Author

Choose a reason for hiding this comment

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

When abort, we will use abort_error, which is by default Aborted, but sometimes could be other value.

@JaySon-Huang
Copy link
Contributor

which unstable test case is caused by this issue?

@JinheLin
Copy link
Contributor

which unstable test case is caused by this issue?

RegionKVStoreV2Test.KVStoreSingleSnapXXX4 @JaySon-Huang

https://ci.pingcap.net/blue/rest/organizations/jenkins/pipelines/tiflash-ghpr-unit-tests/runs/11618/nodes/75/steps/80/log/?start=0

Signed-off-by: CalvinNeo <calvinneo1995@gmail.com>
Signed-off-by: CalvinNeo <calvinneo1995@gmail.com>
@ti-chi-bot ti-chi-bot bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Oct 26, 2023
Signed-off-by: CalvinNeo <calvinneo1995@gmail.com>
@@ -22,14 +22,35 @@

namespace DB
{
enum class ReadFromStreamError
Copy link
Contributor

Choose a reason for hiding this comment

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

I think PrehandleError or PrehandleStatus is a more reasonable name here

Copy link
Member Author

Choose a reason for hiding this comment

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

Renamed to PrehandleTransformStatus, because there is a PrehandleResult for the whole prehandle process

@JaySon-Huang
Copy link
Contributor

The fix of #8199 (comment) is not pushed?

Signed-off-by: CalvinNeo <calvinneo1995@gmail.com>
Signed-off-by: CalvinNeo <calvinneo1995@gmail.com>
Signed-off-by: CalvinNeo <calvinneo1995@gmail.com>
Signed-off-by: CalvinNeo <calvinneo1995@gmail.com>
@ti-chi-bot ti-chi-bot bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Oct 26, 2023
@CalvinNeo
Copy link
Member Author

/run-all-tests

Copy link
Contributor

@JaySon-Huang JaySon-Huang 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 bot added the lgtm label Oct 26, 2023
@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Oct 26, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: JaySon-Huang, JinheLin

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

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [JaySon-Huang,JinheLin]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot bot removed the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Oct 26, 2023
@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Oct 26, 2023

[LGTM Timeline notifier]

Timeline:

  • 2023-10-25 10:57:18.154039274 +0000 UTC m=+2432235.741149420: ☑️ agreed by JinheLin.
  • 2023-10-26 06:11:37.185133648 +0000 UTC m=+2501494.772243792: ☑️ agreed by JaySon-Huang.

@CalvinNeo
Copy link
Member Author

/run-all-tests

@ti-chi-bot ti-chi-bot bot merged commit 5598d20 into pingcap:master Oct 26, 2023
6 checks passed
JaySon-Huang pushed a commit to JaySon-Huang/tiflash that referenced this pull request Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Integration test of parallel prehandling is not stable
3 participants