lib/logstorage: proper exit during block search (#5400)

This commit is contained in:
noodles2hg 2024-02-01 20:11:05 +08:00 committed by Aliaksandr Valialkin
parent 9c75e3ee15
commit 60a8e59366
No known key found for this signature in database
GPG key ID: 52C003EE2BCDB9EB

View file

@ -409,7 +409,9 @@ func (p *part) searchByTenantIDs(so *searchOptions, bhss *blockHeaders, workCh c
if so.minTimestamp > th.maxTimestamp || so.maxTimestamp < th.minTimestamp {
continue
}
scheduleBlockSearch(bh)
if !scheduleBlockSearch(bh) {
return
}
}
if len(bhs) == 0 {
break