Skip to content
This repository has been archived by the owner on Aug 23, 2023. It is now read-only.

correct for delayed lastUpdate updates #1532

Merged
merged 2 commits into from
Nov 14, 2019
Merged

Conversation

replay
Copy link
Contributor

@replay replay commented Nov 13, 2019

We don't always update the lastUpdate property in the cassandra index when a metric receives a data point. There can be a delay of up to cassandra-idx.update-interval. To prevent that we falsely exclude a metric based on its delayed lastUpdate time stamp, we offset the from parameter by the value of cassandra-idx.update-interval at the time when CasIdx.Find() is called.

Fixes: https://github.com/grafana/metrictank-ops/issues/520

@replay replay force-pushed the correct_for_delayed_lastUpdate branch from 8b2b456 to 86655a9 Compare November 13, 2019 22:27
@replay
Copy link
Contributor Author

replay commented Nov 13, 2019

The BigTable index has the same problem, I'll make the same change there.

@replay replay requested a review from woodsaj November 13, 2019 22:32
@Dieterbe Dieterbe merged commit dd68019 into master Nov 14, 2019
@Dieterbe Dieterbe deleted the correct_for_delayed_lastUpdate branch November 14, 2019 19:09
@Dieterbe Dieterbe added this to the sprint-3 milestone Nov 14, 2019
Dieterbe added a commit that referenced this pull request Jun 3, 2021
(instead of at previous fix, which did it at query time for Find(),
see #1532)

This has two main benefits:
1) by making the change to the data, it works equally well across all
   types of queries, in particular this fixes the behavior for TagQuery
2) we no longer over-eagerly adjust the check at query time (if MT has
   seen a new point for a given metric - e.g. if the process has been up for
   a while - than the LastUpdate value in the memory index is perfectly
   accurate, and we don't need to make any adjustment)

fix #1979
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants