enhance: set schema version when creating new collection (#45263)

Related to #43028

Initialize the schema version field when creating a new collection
instance in QueryNode. The schema version is extracted from loadMetaInfo
and assigned to the collection, ensuring proper schema version tracking
and consistency across the distributed system.

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
This commit is contained in:
congqixia 2025-11-04 10:15:32 +08:00 committed by GitHub
parent 576084fe86
commit e6be590b97
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -331,6 +331,7 @@ func NewCollection(collectionID int64, schema *schemapb.CollectionSchema, indexM
dbName: loadMetaInfo.GetDbName(),
dbProperties: loadMetaInfo.GetDbProperties(),
resourceGroup: loadMetaInfo.GetResourceGroup(),
schemaVersion: loadMetaInfo.GetSchemaVersion(),
refCount: atomic.NewUint32(0),
isGpuIndex: isGpuIndex,
loadFields: loadFieldIDs,