diff --git a/pkg/store/lazy_postings.go b/pkg/store/lazy_postings.go index 7e29019e27c..ffcc178d4c3 100644 --- a/pkg/store/lazy_postings.go +++ b/pkg/store/lazy_postings.go @@ -38,7 +38,9 @@ func fetchLazyExpandedPostings( var matchers []*labels.Matcher keysToFetch := keys // If all postings added, we always download all postings and then intersect. - if lazyExpandedPostingEnabled && !addAllPostings && len(postingGroups) > 1 { + // If there is no series max size in meta.json file, skip estimation. + if lazyExpandedPostingEnabled && !addAllPostings && + r.block.meta.Thanos.IndexStats.SeriesMaxSize > 0 && len(postingGroups) > 1 { var totalCardinality int64 minCardinality := int64(math.MaxInt64) minGroupIdx := -1