enhance: indexnode building index record collection id (#32574)

Adding a collection id to the index node log allows you to associate an
index building task with a specific collection.
If the host CPU usage is too high due to index build, you can use the
collection id to quickly locate a specific collection, improving fault
locating efficiency.

Signed-off-by: dengxiaohai <rolkdengxiaohai@didiglobal.com>
Co-authored-by: dengxiaohai <rolkdengxiaohai@didiglobal.com>
This commit is contained in:
dengxiaohai 2024-04-26 17:05:29 +08:00 committed by GitHub
parent 46d7298407
commit 00d0f7c199
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -54,6 +54,7 @@ func (i *IndexNode) CreateJob(ctx context.Context, req *indexpb.CreateJobRequest
} }
defer i.lifetime.Done() defer i.lifetime.Done()
log.Info("IndexNode building index ...", log.Info("IndexNode building index ...",
zap.Int64("collectionID", req.GetCollectionID()),
zap.Int64("indexID", req.GetIndexID()), zap.Int64("indexID", req.GetIndexID()),
zap.String("indexName", req.GetIndexName()), zap.String("indexName", req.GetIndexName()),
zap.String("indexFilePrefix", req.GetIndexFilePrefix()), zap.String("indexFilePrefix", req.GetIndexFilePrefix()),