Skip to content

Commit d19592f

Browse files
added filter for vector lengths
1 parent e2605da commit d19592f

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

posting/mvcc.go

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -125,14 +125,18 @@ func (ir *incrRollupi) rollUpKey(writer *TxnWriter, key []byte) error {
125125
return err
126126
}
127127

128-
pl := &pb.PostingList{}
129-
if err := proto.Unmarshal(kvs[0].Value, pl); err != nil {
130-
return err
131-
}
132-
newLength := codec.ExactLen(pl.Pack)
133-
if newLength != length {
134-
fmt.Println(l.Print())
135-
panic(errors.Errorf("New length %d does not match old length %d", newLength, length))
128+
pk, _ := x.Parse(key)
129+
130+
if pk.IsData() {
131+
pl := &pb.PostingList{}
132+
if err := proto.Unmarshal(kvs[0].Value, pl); err != nil {
133+
return err
134+
}
135+
newLength := codec.ExactLen(pl.Pack)
136+
if newLength != length {
137+
fmt.Println(l.Print())
138+
panic(errors.Errorf("New length %d does not match old length %d", newLength, length))
139+
}
136140
}
137141

138142
RemoveCacheFor(key)

0 commit comments

Comments
 (0)