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: pre-allocate result FieldData space to reduce copy & growslice #29726

Merged

Conversation

congqixia
Copy link
Contributor

See also: #29113

Add a new utitliy function in pkg/util/typetuil to pre-allocate field data slice capacity acoording to search limit. This shall avoid copying the data during AppendFieldData when previous slice is out of space. And shall also save CPU time during high paylog.

See also: milvus-io#29113

Add a new utitliy function in `pkg/util/typetuil` to pre-allocate field
data slice capacity acoording to search limit. This shall avoid copying
the data during `AppendFieldData` when previous slice is out of space.
And shall also save CPU time during high paylog.

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
@sre-ci-robot sre-ci-robot added size/L Denotes a PR that changes 100-499 lines. approved labels Jan 5, 2024
@mergify mergify bot added dco-passed DCO check passed. kind/enhancement Issues or changes related to enhancement labels Jan 5, 2024
Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
Copy link
Contributor

mergify bot commented Jan 5, 2024

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

@congqixia
Copy link
Contributor Author

/run-cpu-e2e

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
@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

Copy link

codecov bot commented Jan 9, 2024

Codecov Report

Attention: 392 lines in your changes are missing coverage. Please review.

Comparison is base (3561586) 80.82% compared to head (5f5bb66) 83.23%.
Report is 34 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #29726      +/-   ##
==========================================
+ Coverage   80.82%   83.23%   +2.41%     
==========================================
  Files         926      693     -233     
  Lines      127767   110943   -16824     
==========================================
- Hits       103271    92348   -10923     
+ Misses      21145    15123    -6022     
- Partials     3351     3472     +121     
Files Coverage Δ
internal/allocator/cached_allocator.go 73.04% <100.00%> (ø)
internal/datacoord/channel_manager.go 77.61% <100.00%> (ø)
internal/datacoord/compaction_trigger.go 85.08% <100.00%> (ø)
internal/datacoord/segment_manager.go 88.80% <100.00%> (+1.27%) ⬆️
internal/datanode/event_manager.go 76.34% <100.00%> (ø)
internal/indexnode/indexnode.go 82.12% <100.00%> (ø)
internal/mq/mqimpl/rocksmq/client/client_impl.go 82.90% <100.00%> (ø)
internal/mq/mqimpl/rocksmq/client/consumer_impl.go 96.29% <100.00%> (ø)
internal/mq/mqimpl/rocksmq/server/rocksmq_impl.go 83.41% <100.00%> (ø)
...rnal/mq/mqimpl/rocksmq/server/rocksmq_retention.go 76.72% <100.00%> (ø)
... and 51 more

... and 272 files with indirect coverage changes

Copy link
Member

@yah01 yah01 left a comment

Choose a reason for hiding this comment

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

/lgtm

@yanliang567 yanliang567 added ci-passed manual-pass manually set pass before ci-passed labeled labels Jan 9, 2024
@sre-ci-robot sre-ci-robot merged commit 8a6e1a4 into milvus-io:master Jan 9, 2024
13 of 14 checks passed
congqixia added a commit to congqixia/milvus that referenced this pull request Jan 11, 2024
…ce (milvus-io#29726)

See also: milvus-io#29113

Add a new utitliy function in `pkg/util/typetuil` to pre-allocate field
data slice capacity acoording to search limit. This shall avoid copying
the data during `AppendFieldData` when previous slice is out of space.
And shall also save CPU time during high paylog.

---------

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
sre-ci-robot pushed a commit that referenced this pull request Jan 11, 2024
…growslice (#29726) (#29866)

Cherry-pick from master
pr: #29726

See also: #29113

Add a new utitliy function in `pkg/util/typetuil` to pre-allocate field
data slice capacity acoording to search limit. This shall avoid copying
the data during `AppendFieldData` when previous slice is out of space.
And shall also save CPU time during high paylog.

---------

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
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 manual-pass manually set pass before ci-passed labeled sig/testing size/L Denotes a PR that changes 100-499 lines. test/integration integration test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants