Skip to content

Commit

Permalink
fix(namespcae): fix bug that caused min namespace id to change
Browse files Browse the repository at this point in the history
  • Loading branch information
Wondertan committed Mar 29, 2021
1 parent babfaf9 commit 2198e0e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion namespace/digest.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,11 @@ func (d IntervalDigest) Hash() []byte {
}

func (d IntervalDigest) Bytes() []byte {
return append(append(d.min, d.max...), d.digest...)
return append(append(append(
make([]byte, 0, len(d.min)*2+len(d.digest)),
d.min...),
d.max...),
d.digest...)
}

func (d *IntervalDigest) Equal(to *IntervalDigest) bool {
Expand Down

0 comments on commit 2198e0e

Please sign in to comment.