enhance: Print out-of-date schema ts when returning ErrSchemaMismatch (#42790)

Related to #41858

This PR add log while debugging schema mismatch between pymilvus cache
and proxy schema.

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
This commit is contained in:
congqixia 2025-06-17 10:38:37 +08:00 committed by GitHub
parent 9c31a47c0f
commit 880915e08b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 9 additions and 2 deletions

View File

@ -149,7 +149,11 @@ func (it *insertTask) PreExecute(ctx context.Context) error {
if it.schemaTimestamp != 0 {
if it.schemaTimestamp != colInfo.updateTimestamp {
err := merr.WrapErrCollectionSchemaMisMatch(collectionName)
log.Ctx(ctx).Info("collection schema mismatch", zap.String("collectionName", collectionName), zap.Error(err))
log.Ctx(ctx).Info("collection schema mismatch",
zap.String("collectionName", collectionName),
zap.Uint64("requestSchemaTs", it.schemaTimestamp),
zap.Uint64("collectionSchemaTs", colInfo.updateTimestamp),
zap.Error(err))
return err
}
}

View File

@ -340,7 +340,10 @@ func (it *upsertTask) PreExecute(ctx context.Context) error {
if it.schemaTimestamp != 0 {
if it.schemaTimestamp != colInfo.updateTimestamp {
err := merr.WrapErrCollectionSchemaMisMatch(collectionName)
log.Info("collection schema mismatch", zap.String("collectionName", collectionName), zap.Error(err))
log.Info("collection schema mismatch", zap.String("collectionName", collectionName),
zap.Uint64("requestSchemaTs", it.schemaTimestamp),
zap.Uint64("collectionSchemaTs", colInfo.updateTimestamp),
zap.Error(err))
return err
}
}