-
Notifications
You must be signed in to change notification settings - Fork 3k
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
enhance: rewrite index params for compatibility #35788
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ 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
|
func IsScalarIndexType(indexType IndexType) bool { | ||
return indexType == IndexSTLSORT || indexType == IndexTRIE || indexType == IndexTrie || | ||
indexType == IndexBitmap || indexType == IndexHybrid || indexType == IndexINVERTED || | ||
indexType == AutoIndex |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
8d63dae
to
6a5ae9e
Compare
@@ -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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -224,14 +225,32 @@ func checkParams(fieldIndex *model.Index, req *indexpb.CreateIndexRequest) bool | |||
} | |||
} | |||
exist = true | |||
break |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why?
internal/datacoord/index_meta.go
Outdated
} | ||
} | ||
} | ||
log.Debug("final request", zap.Any("create index request", req.String())) |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
6a5ae9e
to
0d44817
Compare
/lgtm |
…ut config changed Signed-off-by: luzhang <[email protected]>
0d44817
to
e860366
Compare
/approve |
[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 |
#32900