lib/mergeset: fix linter error (#2864)

This commit is contained in:
Dmytro Kozlov 2022-07-13 12:31:35 +03:00 committed by GitHub
parent 93fbd0c54b
commit 306ec10c39
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -203,15 +203,15 @@ func (bsm *blockStreamMerger) flushIB(bsw *blockStreamWriter, ph *partHeader, it
type bsrHeap []*blockStreamReader
func (h bsrHeap) getNextReader() *blockStreamReader {
if len(h) < 2 {
func (bh bsrHeap) getNextReader() *blockStreamReader {
if len(bh) < 2 {
return nil
}
if len(h) < 3 {
return h[1]
if len(bh) < 3 {
return bh[1]
}
a := h[1]
b := h[2]
a := bh[1]
b := bh[2]
if string(a.bh.firstItem) <= string(b.bh.firstItem) {
return a
}