Skip to content

Commit

Permalink
fix: Revert reuse deserialize result to fix data overwritten (milvus-…
Browse files Browse the repository at this point in the history
…io#34683)

See also milvus-io#34637

Signed-off-by: Congqi Xia <[email protected]>
  • Loading branch information
congqixia authored Jul 15, 2024
1 parent acb33bb commit eb4bfa3
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions internal/storage/serde.go
Original file line number Diff line number Diff line change
Expand Up @@ -538,9 +538,8 @@ func (deser *DeserializeReader[T]) Next() error {
deser.pos = 0
deser.rec = deser.rr.Record()

if deser.values == nil || len(deser.values) != deser.rec.Len() {
deser.values = make([]T, deser.rec.Len())
}
deser.values = make([]T, deser.rec.Len())

if err := deser.deserializer(deser.rec, deser.values); err != nil {
return err
}
Expand Down

0 comments on commit eb4bfa3

Please sign in to comment.