Skip to content

Commit

Permalink
fix: segment stub deserialization (#1310)
Browse files Browse the repository at this point in the history
  • Loading branch information
kolesnikovae authored Jul 26, 2022
1 parent beb6156 commit 1b65b32
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/storage/segment/serialization.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,13 @@ func Deserialize(r io.Reader) (*Segment, error) {
if err != nil {
return nil, err
}

s.populateFromMetadata(mdata)

// In some cases, there can be no nodes.
if br.Buffered() == 0 {
return s, nil
}

parents := []*streeNode{nil}
for len(parents) > 0 {
depth, err := varint.Read(br)
Expand Down

0 comments on commit 1b65b32

Please sign in to comment.