mirror of https://github.com/milvus-io/milvus.git
Fix incompatibility of stats log (#16277)
Signed-off-by: xiaofan-luan <xiaofan.luan@zilliz.com>pull/16285/head
parent
0baa8c60a5
commit
b6b3c9863c
|
@ -56,14 +56,16 @@ func (stats *PrimaryKeyStats) UnmarshalJSON(data []byte) error {
|
|||
}
|
||||
|
||||
stats.PkType = int64(schemapb.DataType_Int64)
|
||||
var typeValue int64
|
||||
err = json.Unmarshal(*messageMap["pkType"], &typeValue)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
// valid pkType
|
||||
if typeValue > 0 {
|
||||
stats.PkType = typeValue
|
||||
if value, ok := messageMap["pkType"]; ok && value != nil {
|
||||
var typeValue int64
|
||||
err = json.Unmarshal(*value, &typeValue)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
// valid pkType
|
||||
if typeValue > 0 {
|
||||
stats.PkType = typeValue
|
||||
}
|
||||
}
|
||||
|
||||
switch schemapb.DataType(stats.PkType) {
|
||||
|
|
Loading…
Reference in New Issue