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: cache collection schema attributes to reduce proxy cpu #29668

Merged

Conversation

congqixia
Copy link
Contributor

See also #29113

The collection schema is crucial when performing search/query but some of the information is calculated for every request.

This PR change schema field of cached collection info into a utility schemaInfo type to store some stable result, say pk field, partitionKeyEnabled, etc. And provided field name to id map for search/query services.

@sre-ci-robot sre-ci-robot added the size/L Denotes a PR that changes 100-499 lines. label Jan 4, 2024
@mergify mergify bot added dco-passed DCO check passed. kind/enhancement Issues or changes related to enhancement labels Jan 4, 2024
Copy link
Contributor

mergify bot commented Jan 4, 2024

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

Copy link
Contributor

mergify bot commented Jan 4, 2024

@congqixia ut workflow job failed, comment rerun ut can trigger the job again.

See also milvus-io#29113

The collection schema is crucial when performing search/query but some
of the information is calculated for every request.

This PR change schema field of cached collection info into a utility
`schemaInfo` type to store some stable result, say pk field,
partitionKeyEnabled, etc. And provided field name to id map for
search/query services.

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
@congqixia congqixia force-pushed the refine_proxy_metacache_schema branch from 1584e98 to 19037a9 Compare January 4, 2024 05:43
Copy link
Contributor

mergify bot commented Jan 4, 2024

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

@congqixia
Copy link
Contributor Author

/run-cpu-e2e

Copy link
Contributor

mergify bot commented Jan 4, 2024

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

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
Copy link

codecov bot commented Jan 4, 2024

Codecov Report

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

Comparison is base (99e0f1e) 83.72% compared to head (34d27ec) 80.85%.
Report is 8 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #29668      +/-   ##
==========================================
- Coverage   83.72%   80.85%   -2.88%     
==========================================
  Files         679      921     +242     
  Lines      108623   127304   +18681     
==========================================
+ Hits        90949   102926   +11977     
- Misses      14361    21071    +6710     
+ Partials     3313     3307       -6     
Files Coverage Δ
internal/proxy/meta_cache.go 90.60% <100.00%> (+0.79%) ⬆️
internal/proxy/task.go 85.48% <100.00%> (ø)
internal/proxy/task_delete.go 85.98% <100.00%> (ø)
internal/proxy/task_index.go 75.74% <100.00%> (ø)
internal/proxy/task_query.go 79.26% <100.00%> (ø)
internal/proxy/util.go 90.35% <100.00%> (-0.26%) ⬇️
...nternal/distributed/proxy/httpserver/handler_v1.go 90.87% <0.00%> (ø)
internal/proxy/task_insert.go 72.72% <66.66%> (ø)
internal/proxy/task_search.go 80.08% <87.50%> (-0.11%) ⬇️
internal/proxy/task_upsert.go 71.32% <66.66%> (ø)

... and 258 files with indirect coverage changes

@mergify mergify bot added the ci-passed label Jan 4, 2024
@XuanYang-cn
Copy link
Contributor

/lgtm
/approve

@sre-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: congqixia, 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 4f8c540 into milvus-io:master Jan 4, 2024
14 checks passed
congqixia added a commit to congqixia/milvus that referenced this pull request Jan 4, 2024
…us-io#29668)

See also milvus-io#29113

The collection schema is crucial when performing search/query but some
of the information is calculated for every request.

This PR change schema field of cached collection info into a utility
`schemaInfo` type to store some stable result, say pk field,
partitionKeyEnabled, etc. And provided field name to id map for
search/query services.

---------

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
@xiaofan-luan
Copy link
Collaborator

any performance comparison?

sre-ci-robot pushed a commit that referenced this pull request Jan 7, 2024
…roxy cpu (#29668) (#29692)

Cherry-pick from master
pr: #29668

See also #29113

The collection schema is crucial when performing search/query but some
of the information is calculated for every request.

This PR change schema field of cached collection info into a utility
`schemaInfo` type to store some stable result, say pk field,
partitionKeyEnabled, etc. And provided field name to id map for
search/query services.

---------

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 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