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

vector: Fix the bug that the local index in CFTiny is not removed during MinorCompaction (#9945) #9951

Open
wants to merge 2 commits into
base: release-8.5
Choose a base branch
from

Conversation

ti-chi-bot
Copy link
Member

This is an automated cherry-pick of #9945

What problem does this PR solve?

Issue Number: close #9946

Problem Summary:

Some pages for local index in the ColumnFileTiny is not removed when doing MinorCompaction

wbs.removed_log.delPage(t_file->getDataPageId());

In MinorCompaction::prepare we use wbs.removed_log.delPage(t_file->getDataPageId()); to remove the ColumnFileTiny. But this will not remove the related LocalIndex page_id with the ColumnFileTiny. We must use t_file->removeData(wbs); to remove the ColumnFileTiny along with its LocalIndex page_ids.

BTW, SegmentSplit, SegmentMerge and SegmentDeltaMerge (MajorCompaction) calls DeltaValueSpace::recordRemoveColumnFilesPages and can correctly remove the LocalIndex page_ids.

What is changed and how it works?

vector: Fix the bug that the local index in CFTiny is not removed during MinorCompaction
Add test cases about the removing page_id when doing MinorCompaction
Add test cases about querying the ColumnFileTiny in DeltaVS with VectorIndex could filter the return rows

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 the bug that some data may not be able to be removed after user inserted rows into a table with vector index

@ti-chi-bot ti-chi-bot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. type/cherry-pick-for-release-8.5 This PR is cherry-picked to release-8.5 from a source PR. labels Mar 6, 2025
Copy link
Contributor

ti-chi-bot bot commented Mar 6, 2025

This cherry pick PR is for a release branch and has not yet been approved by triage owners.
Adding the do-not-merge/cherry-pick-not-approved label.

To merge this cherry pick:

  1. It must be approved by the approvers firstly.
  2. AFTER it has been approved by approvers, please wait for the cherry-pick merging approval from triage owners.

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 kubernetes-sigs/prow repository.

@ti-chi-bot
Copy link
Member Author

@JaySon-Huang This PR has conflicts, I have hold it.
Please resolve them or ask others to resolve them, then comment /unhold to remove the hold label.

Signed-off-by: JaySon-Huang <[email protected]>
Copy link
Contributor

ti-chi-bot bot commented Mar 6, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from jayson-huang, ensuring that each of them provides their approval before proceeding. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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

Copy link
Contributor

ti-chi-bot bot commented Mar 6, 2025

@ti-chi-bot: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-integration-test cff8a52 link true /test pull-integration-test
pull-unit-test cff8a52 link true /test pull-unit-test

Full PR test history. Your PR dashboard.

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 kubernetes-sigs/prow repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do-not-merge/cherry-pick-not-approved do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. type/cherry-pick-for-release-8.5 This PR is cherry-picked to release-8.5 from a source PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants