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: Add delete buffer related quota logic #35918

Conversation

congqixia
Copy link
Contributor

See also #35303

@sre-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: congqixia

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 added approved size/L Denotes a PR that changes 100-499 lines. labels Sep 3, 2024
@mergify mergify bot added dco-passed DCO check passed. kind/enhancement Issues or changes related to enhancement labels Sep 3, 2024
Signed-off-by: Congqi Xia <[email protected]>
Copy link
Contributor

@tedxu tedxu left a comment

Choose a reason for hiding this comment

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

The patch looks good to me, except some minor issues.

Question: will this patch deprecate the same protection feature based on L0 row number?

Comment on lines 982 to 989
deleteBufferRowCountProtection:
enabled: false # switch to enable delete buffer row count quota
lowWaterLevel: 32768 # delete buffer row count quota, low water level
highWaterLevel: 65536 # delete buffer row count quota, high water level
deleteBufferSizeProtection:
enabled: false # switch to enable delete buffer size quota
lowWaterLevel: 32768 # delete buffer size quota, low water level
highWaterLevel: 65536 # delete buffer size quota, high water level
Copy link
Contributor

Choose a reason for hiding this comment

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

The default values may be too small, I suppose it won't be a problem if the deletions can be easily consumed in less than 1 minute or so.

And, please note the unit of the delete buffer size in the comments.

pkg/util/paramtable/quota_param.go Show resolved Hide resolved
@congqixia
Copy link
Contributor Author

Question: will this patch deprecate the same protection feature based on L0 row number?

nope, this PR only add quota rules based on delete buffer number/size on querynodes, which will not affect the previously added l0 segment statistics one

@mergify mergify bot added the ci-passed label Sep 3, 2024
Copy link

codecov bot commented Sep 3, 2024

Codecov Report

Attention: Patch coverage is 79.71014% with 28 lines in your changes missing coverage. Please review.

Project coverage is 72.64%. Comparing base (325f198) to head (b8f31dd).
Report is 18 commits behind head on master.

Files with missing lines Patch % Lines
internal/rootcoord/quota_center.go 26.31% 28 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #35918      +/-   ##
==========================================
- Coverage   81.58%   72.64%   -8.94%     
==========================================
  Files        1264     1264              
  Lines      150745   150876     +131     
==========================================
- Hits       122983   109604   -13379     
- Misses      22878    36385   +13507     
- Partials     4884     4887       +3     
Files with missing lines Coverage Δ
internal/querynodev2/delegator/delegator.go 87.14% <100.00%> (-0.34%) ⬇️
...uerynodev2/delegator/deletebuffer/delete_buffer.go 98.66% <100.00%> (+0.55%) ⬆️
.../querynodev2/delegator/deletebuffer/delete_item.go 100.00% <100.00%> (ø)
...odev2/delegator/deletebuffer/list_delete_buffer.go 100.00% <100.00%> (ø)
internal/querynodev2/metrics_info.go 85.49% <100.00%> (+1.04%) ⬆️
pkg/util/paramtable/quota_param.go 80.88% <100.00%> (+0.65%) ⬆️
internal/rootcoord/quota_center.go 83.45% <26.31%> (-2.06%) ⬇️

... and 247 files with indirect coverage changes

Comment on lines +982 to +985
deleteBufferRowCountProtection:
enabled: false # switch to enable delete buffer row count quota
lowWaterLevel: 32768 # delete buffer row count quota, low water level
highWaterLevel: 65536 # delete buffer row count quota, high water level
Copy link
Contributor

@XuanYang-cn XuanYang-cn Sep 3, 2024

Choose a reason for hiding this comment

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

This can be merged ahead, but the waterlevel value is not sensible, need to adjust it before put in prod

Copy link
Contributor Author

Choose a reason for hiding this comment

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

agree, this value shall be updated after we get some experience data from the tests

@tedxu
Copy link
Contributor

tedxu commented Sep 5, 2024

/lgtm

@sre-ci-robot sre-ci-robot merged commit 8593c45 into milvus-io:master Sep 5, 2024
14 of 16 checks passed
congqixia added a commit to congqixia/milvus that referenced this pull request Sep 5, 2024
congqixia added a commit to congqixia/milvus that referenced this pull request Sep 5, 2024
sre-ci-robot pushed a commit that referenced this pull request Sep 5, 2024
Cherry pick from master
pr: #35128 #35918
See also #35303

---------

Signed-off-by: aoiasd <[email protected]>
Signed-off-by: Congqi Xia <[email protected]>
Co-authored-by: aoiasd <[email protected]>
@congqixia congqixia deleted the enhance/add_deletebuffer_related_quota branch September 5, 2024 10:42
foxspy pushed a commit to foxspy/milvus that referenced this pull request Sep 6, 2024
chyezh pushed a commit to chyezh/milvus that referenced this pull request Sep 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved ci-passed dco-passed DCO check passed. kind/enhancement Issues or changes related to enhancement lgtm size/L Denotes a PR that changes 100-499 lines.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants