VictoriaMetrics/docs/changelog
Nikolay 59d2b4c7fc
lib/storage: properly check for minMissingTimestamps
After changes at commit 787b9cd. Minimal timestamps for extDB check was performed without context of the index search prefix.
It worked fine for Single node version, but for cluster version a different prefix was used for
metricID search requests. It may lead to incomplete results, if minimal missing timestamp was cached
for the tenant with different ingestion patterns.

 Minimal reproducible case is:
- metrics were ingested for tenants 0 and 1
- at some point in time metrics ingestion for tenant 1 stopped
- index records have the following timestamps layout:
 tenant 0:  1,2,3,4,5,6
 tenant 1:  1,2,3,4
- after indexDB rotation, containsTimeRange lookups may produce
  incorrect results:
 time range request for tenant 1 - 5:6 caches 5 as min timestamp
 request for the same or smaller time range for tenant 0 now returns
empty results.

Second case:
- requests for the tenant without metrics always updates atomic value with incorrect minimal time range for other tenants.

 This commit replaces single atomic with map of search prefix keys. It should have slight performance overhead,
but work consistently for cluster version. minMissingTimestamp is cached by prefix search key, which included tenantID.

 Since it will be only populated at runtime, it doesn't hold unused tenants for queries.

Related issue: 
https://github.com/VictoriaMetrics/VictoriaMetrics/issues/7417
2024-11-15 16:18:32 +01:00
..
_index.md docs: move changelog to dir (#6853) 2024-08-22 16:59:17 +02:00
CHANGELOG.md lib/storage: properly check for minMissingTimestamps 2024-11-15 16:18:32 +01:00
CHANGELOG_2020.md docs: spelling fixes (#7420) 2024-11-06 13:58:16 +01:00
CHANGELOG_2021.md docs: spelling fixes (#7420) 2024-11-06 13:58:16 +01:00
CHANGELOG_2022.md docs: spelling fixes (#7420) 2024-11-06 13:58:16 +01:00
CHANGELOG_2023.md docs: spelling fixes (#7420) 2024-11-06 13:58:16 +01:00