Add comment for CreateIndex in indexnode (#8168)

Signed-off-by: cai.zhang <cai.zhang@zilliz.com>
pull/8020/head
cai.zhang 2021-09-18 00:01:51 +08:00 committed by GitHub
parent 74bb712527
commit 8d5dc5ba07
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -158,6 +158,8 @@ func (i *IndexNode) isHealthy() bool {
return code == internalpb.StateCode_Healthy
}
// CreateIndex receives request from IndexCoordinator to build an index.
// Index building is asynchronous, so when an index building request comes, IndexNode records the task and returns.
func (i *IndexNode) CreateIndex(ctx context.Context, request *indexpb.CreateIndexRequest) (*commonpb.Status, error) {
if i.stateCode.Load().(internalpb.StateCode) != internalpb.StateCode_Healthy {
return &commonpb.Status{