fix: disable build old version jsonstats from request (#45101)

#44132

Signed-off-by: luzhang <luzhang@zilliz.com>
Co-authored-by: luzhang <luzhang@zilliz.com>
This commit is contained in:
zhagnlu 2025-10-27 19:50:10 +08:00 committed by GitHub
parent 569a5b40d2
commit a38610cd5d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -337,6 +337,13 @@ func (st *statsTask) Execute(ctx context.Context) error {
return nil
}
// for compatibility, we only support json data format version 2 and above after 2.6
// for old version, we skip creating json key index
if st.req.GetJsonKeyStatsDataFormat() < 2 {
log.Ctx(ctx).Info("json data format version is too old, skip creating json key index", zap.Int64("data format", st.req.GetJsonKeyStatsDataFormat()))
return nil
}
err = st.createJSONKeyStats(ctx,
st.req.GetStorageConfig(),
st.req.GetCollectionID(),