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

enhance: Use partitionID when delete by partitionKey #38232

Merged

Conversation

XuanYang-cn
Copy link
Contributor

@XuanYang-cn XuanYang-cn commented Dec 5, 2024

When delete by partition_key, Milvus will generates L0 segments globally. During L0 Compaction, those L0 segments will touch all partitions collection wise. Due to the false-positive rate of segment bloomfilters, L0 compactions will append false deltalogs to completed irrelevant partitions, which causes *partition deletion amplification.

This PR uses partition_key to set targeted partitionID when producing deleteMsgs into MsgStreams. This'll narrow down L0 segments scope to partition level, and remove the false-positive influence collection-wise.

However, due to DeleteMsg structure, we can only label one partition to one deleteMsg, so this enhancement fails if user wants to delete over 2 partition_keys in one deletion.

pr: #38231
See also: #34665

@sre-ci-robot sre-ci-robot added size/XXL Denotes a PR that changes 1000+ lines. area/test sig/testing test/integration integration test labels Dec 5, 2024
@mergify mergify bot added dco-passed DCO check passed. kind/enhancement Issues or changes related to enhancement ci-passed labels Dec 5, 2024
Copy link

codecov bot commented Dec 9, 2024

Codecov Report

Attention: Patch coverage is 86.51685% with 12 lines in your changes missing coverage. Please review.

Project coverage is 79.46%. Comparing base (e82af48) to head (c4bbbae).
Report is 2 commits behind head on 2.4.

Files with missing lines Patch % Lines
internal/proxy/task_delete.go 86.20% 8 Missing and 4 partials ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##              2.4   #38232      +/-   ##
==========================================
- Coverage   80.44%   79.46%   -0.99%     
==========================================
  Files        1077     1077              
  Lines      169442   169440       -2     
==========================================
- Hits       136316   134639    -1677     
- Misses      28677    30326    +1649     
- Partials     4449     4475      +26     
Files with missing lines Coverage Δ
internal/datacoord/services.go 85.50% <ø> (+0.19%) ⬆️
internal/proxy/search_util.go 80.46% <100.00%> (-0.16%) ⬇️
internal/proxy/task_delete.go 89.74% <86.20%> (-2.50%) ⬇️

... and 106 files with indirect coverage changes

@XuanYang-cn XuanYang-cn force-pushed the enhance/delete-partitionkey2id branch from c7b09e5 to fb7e0a1 Compare December 17, 2024 10:09
@mergify mergify bot removed the ci-passed label Dec 17, 2024
Copy link
Contributor

mergify bot commented Dec 17, 2024

@XuanYang-cn E2e jenkins job failed, comment /run-cpu-e2e can trigger the job again.

2 similar comments
Copy link
Contributor

mergify bot commented Dec 17, 2024

@XuanYang-cn E2e jenkins job failed, comment /run-cpu-e2e can trigger the job again.

Copy link
Contributor

mergify bot commented Dec 18, 2024

@XuanYang-cn E2e jenkins job failed, comment /run-cpu-e2e can trigger the job again.

@XuanYang-cn XuanYang-cn force-pushed the enhance/delete-partitionkey2id branch from 95afbe7 to 6fa91fc Compare December 19, 2024 02:45
Copy link
Contributor

mergify bot commented Dec 19, 2024

@XuanYang-cn Thanks for your contribution. Please submit with DCO, see the contributing guide https://github.com/milvus-io/milvus/blob/master/CONTRIBUTING.md#developer-certificate-of-origin-dco.

@mergify mergify bot added needs-dco DCO is missing in this pull request. ci-passed and removed dco-passed DCO check passed. labels Dec 19, 2024
When delete by partition_key, Milvus will generates L0 segments
globally. During L0 Compaction, those L0 segments will touch all
partitions collection wise. Due to the false-positive rate of segment bloomfilters,
L0 compactions will append false deltalogs to completed irrelevant partitions,
which causes *partition deletion amplification.

This PR uses partition_key to set targeted partitionID when producing
deleteMsgs into MsgStreams. This'll narrow down L0 segments
scope to partition level, and remove the false-positive
influence collection-wise.

However, due to DeleteMsg structure, we can only label one partition to one deleteMsg,
so this enhancement fails if user wants to delete over 2 partition_keys in one deletion.

Signed-off-by: yangxuan <[email protected]>
@XuanYang-cn XuanYang-cn force-pushed the enhance/delete-partitionkey2id branch from 6fa91fc to c4bbbae Compare December 20, 2024 02:30
@mergify mergify bot added dco-passed DCO check passed. and removed needs-dco DCO is missing in this pull request. ci-passed labels Dec 20, 2024
Copy link
Contributor

mergify bot commented Dec 20, 2024

@XuanYang-cn E2e jenkins job failed, comment /run-cpu-e2e can trigger the job again.

@XuanYang-cn
Copy link
Contributor Author

/run-cpu-e2e

@mergify mergify bot added the ci-passed label Dec 20, 2024
@tedxu
Copy link
Contributor

tedxu commented Dec 23, 2024

/lgtm
/approve

@sre-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: tedxu, XuanYang-cn

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

@sre-ci-robot sre-ci-robot merged commit 21d76ad into milvus-io:2.4 Dec 23, 2024
15 checks passed
@XuanYang-cn XuanYang-cn deleted the enhance/delete-partitionkey2id branch December 23, 2024 07:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved area/test ci-passed dco-passed DCO check passed. kind/enhancement Issues or changes related to enhancement lgtm sig/testing size/XXL Denotes a PR that changes 1000+ lines. test/integration integration test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants