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 anti semi join (release-7.5) #8792

Merged
merged 3 commits into from
Feb 27, 2024

Conversation

windtalker
Copy link
Contributor

@windtalker windtalker commented Feb 27, 2024

What problem does this PR solve?

Issue Number: close #8791

Problem Summary:

Ref #8791 for details

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

Fix a bug that anti-semi join may get wrong result if the join has other condition

Signed-off-by: xufei <xufeixw@mail.ustc.edu.cn>
@ti-chi-bot ti-chi-bot bot added release-note-none Denotes a PR that doesn't merit a release note. do-not-merge/cherry-pick-not-approved size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Feb 27, 2024
Copy link
Contributor

@yibin87 yibin87 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 needs-1-more-lgtm Indicates a PR needs 1 more LGTM. approved labels Feb 27, 2024
@windtalker windtalker added the needs-cherry-pick-release-7.1 Should cherry pick this PR to release-7.1 branch. label Feb 27, 2024
Signed-off-by: xufei <xufeixw@mail.ustc.edu.cn>
@ti-chi-bot ti-chi-bot added the cherry-pick-approved Cherry pick PR approved by release team. label Feb 27, 2024
@windtalker
Copy link
Contributor Author

/run-all-tests

@@ -1304,6 +1304,9 @@ Block Join::doJoinBlockHash(ProbeProcessInfo & probe_process_info) const
offsets_to_replicate->assign(
offsets_to_replicate->begin() + probe_process_info.start_row,
offsets_to_replicate->begin() + probe_process_info.end_row);
if (isAntiJoin(kind) && filter != nullptr)
filter->assign(filter->begin() + probe_process_info.start_row,
Copy link
Contributor

Choose a reason for hiding this comment

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

Better not to use assign because it uses memcpy which has an undefined behavior if two memory locations are overlapped.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I aggree, but since it is close to the release deadline, I suggest we keep assign in this pr and fix it later since assign is used many places, it will bring extra risk if we change too many in this pr.

Copy link
Contributor

Choose a reason for hiding this comment

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

ok

@ti-chi-bot ti-chi-bot bot added the lgtm label Feb 27, 2024
Copy link
Contributor

ti-chi-bot bot commented Feb 27, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: gengliqi, yibin87

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:

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 Feb 27, 2024
Copy link
Contributor

ti-chi-bot bot commented Feb 27, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-02-27 03:59:27.005701007 +0000 UTC m=+934455.753324115: ☑️ agreed by yibin87.
  • 2024-02-27 06:10:59.666849961 +0000 UTC m=+942348.414473072: ☑️ agreed by gengliqi.

@ti-chi-bot ti-chi-bot bot merged commit 9970e49 into pingcap:release-7.5 Feb 27, 2024
5 checks passed
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-7.1: #8793.

ti-chi-bot pushed a commit to ti-chi-bot/tiflash that referenced this pull request Feb 27, 2024
Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
@JaySon-Huang JaySon-Huang changed the title fix anti semi join fix anti semi join (release-7.5) Feb 27, 2024
@JaySon-Huang
Copy link
Contributor

I think you should update the release note to describe what bug has been fixed

@ti-chi-bot ti-chi-bot bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed release-note-none Denotes a PR that doesn't merit a release note. labels Feb 27, 2024
@windtalker
Copy link
Contributor Author

I think you should update the release note to describe what bug has been fixed

Done

@windtalker windtalker deleted the fix_anti_semi_join branch March 1, 2024 01:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved cherry-pick-approved Cherry pick PR approved by release team. lgtm needs-cherry-pick-release-7.1 Should cherry pick this PR to release-7.1 branch. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants