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: rewrite index params for compatibility #35788

Merged

Conversation

zhagnlu
Copy link
Contributor

@zhagnlu zhagnlu commented Aug 28, 2024

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

codecov bot commented Aug 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 72.61%. Comparing base (4d2f96c) to head (e860366).
Report is 51 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #35788      +/-   ##
==========================================
+ Coverage   72.29%   72.61%   +0.32%     
==========================================
  Files        1238     1264      +26     
  Lines      148063   150710    +2647     
==========================================
+ Hits       107039   109443    +2404     
- Misses      36254    36383     +129     
- Partials     4770     4884     +114     
Files with missing lines Coverage Δ
internal/datacoord/index_meta.go 95.74% <100.00%> (+0.45%) ⬆️
internal/proxy/task_index.go 84.05% <100.00%> (+0.02%) ⬆️
pkg/util/indexparamcheck/index_type.go 83.33% <100.00%> (+1.11%) ⬆️

... and 214 files with indirect coverage changes

func IsScalarIndexType(indexType IndexType) bool {
return indexType == IndexSTLSORT || indexType == IndexTRIE || indexType == IndexTrie ||
indexType == IndexBitmap || indexType == IndexHybrid || indexType == IndexINVERTED ||
indexType == AutoIndex
Copy link
Collaborator

Choose a reason for hiding this comment

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

AutoIndex can also be VectorIndex.

Copy link
Contributor Author

@zhagnlu zhagnlu Aug 29, 2024

Choose a reason for hiding this comment

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

OK, remove it, actually indexparam not include autoindex, userindexpram use it

@zhagnlu zhagnlu force-pushed the rewrite_indexparam_autoindex branch from 8d63dae to 6a5ae9e Compare August 29, 2024 02:31
@mergify mergify bot added ci-passed and removed ci-passed labels Aug 29, 2024
@@ -209,6 +209,7 @@ func checkParams(fieldIndex *model.Index, req *indexpb.CreateIndexRequest) bool
for i, param2 := range req.GetUserIndexParams() {
if param2.Key == param1.Key && param2.Value == param1.Value {
exist = true
break
Copy link
Collaborator

Choose a reason for hiding this comment

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

why?

Copy link
Contributor

@chasingegg chasingegg Aug 30, 2024

Choose a reason for hiding this comment

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

have to admit original logic is not well-written, but we should not break here, need to check all the params and make sure all the params are the same

Copy link
Contributor Author

Choose a reason for hiding this comment

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

have to admit original logic is not well-written, but we should not break here, need to check all the params and make sure all the params are the same

acutally, outside have circle
image
break is just break current key, outside keys always do this

@@ -224,14 +225,32 @@ func checkParams(fieldIndex *model.Index, req *indexpb.CreateIndexRequest) bool
}
}
exist = true
break
Copy link
Collaborator

Choose a reason for hiding this comment

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

why?

}
}
}
log.Debug("final request", zap.Any("create index request", req.String()))
Copy link
Contributor

Choose a reason for hiding this comment

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

use info or warn log ? help to debug

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok

@zhagnlu zhagnlu force-pushed the rewrite_indexparam_autoindex branch from 6a5ae9e to 0d44817 Compare September 2, 2024 02:57
@mergify mergify bot removed the ci-passed label Sep 2, 2024
@chasingegg
Copy link
Contributor

/lgtm

@zhagnlu zhagnlu force-pushed the rewrite_indexparam_autoindex branch from 0d44817 to e860366 Compare September 2, 2024 09:38
@sre-ci-robot sre-ci-robot removed the lgtm label Sep 2, 2024
@mergify mergify bot removed the ci-passed label Sep 2, 2024
@czs007
Copy link
Collaborator

czs007 commented Sep 2, 2024

/approve
/lgtm

@sre-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: czs007, zhagnlu

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 325f198 into milvus-io:master Sep 2, 2024
15 of 16 checks passed
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