mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2025-01-30 15:22:07 +00:00
lib/storage: always start using per-day inverted index on the next day after its creation
The current day could miss entries for already stopped time series before enabling per-day index. This fixes the issue when queries return empty results during the first hour after upgrading to v1.29.*
This commit is contained in:
parent
c050abbbad
commit
2ab4cea5e5
1 changed files with 3 additions and 2 deletions
|
@ -1001,8 +1001,9 @@ func (is *indexSearch) getStartDateForPerDayInvertedIndex() (uint64, error) {
|
|||
if err := ts.Error(); err != nil {
|
||||
return 0, err
|
||||
}
|
||||
// The database is empty. Return the current date.
|
||||
return minDate, nil
|
||||
// There are no (date,tag)->metricIDs entries in the database yet.
|
||||
// Return the next date, since the current date may contain unindexed data.
|
||||
return minDate + 1, nil
|
||||
}
|
||||
|
||||
func (is *indexSearch) loadDeletedMetricIDs() (*uint64set.Set, error) {
|
||||
|
|
Loading…
Reference in a new issue