lib/storage: removed duplicate checks for empty parts during merge - another check is in the beginning of mergeParts functions

This commit is contained in:
Aliaksandr Valialkin 2020-09-17 01:48:57 +03:00
parent f2a449983d
commit 020bd8685e

View file

@ -940,9 +940,6 @@ func (pt *partition) mergeBigParts(isFinal bool) error {
pws := getPartsToMerge(pt.bigParts, maxRows, isFinal)
pt.partsLock.Unlock()
if len(pws) == 0 {
return errNothingToMerge
}
return pt.mergeParts(pws, pt.stopCh)
}
@ -961,9 +958,6 @@ func (pt *partition) mergeSmallParts(isFinal bool) error {
pws := getPartsToMerge(pt.smallParts, maxRows, isFinal)
pt.partsLock.Unlock()
if len(pws) == 0 {
return errNothingToMerge
}
return pt.mergeParts(pws, pt.stopCh)
}