app/vmalert: remove unclear comment

The timestamp alignment should be applied as a last step
to keep the timestamp consistent.

Signed-off-by: hagen1778 <roman@victoriametrics.com>
This commit is contained in:
hagen1778 2023-10-26 15:41:35 +02:00 committed by Aliaksandr Valialkin
parent 076a796061
commit ddedeb1d42
No known key found for this signature in database
GPG Key ID: A72BEC6CD3D0DED1

View File

@ -594,10 +594,9 @@ func (g *Group) adjustReqTimestamp(timestamp time.Time) time.Time {
return ts
}
// account for delay before adjusting the timestamp.
// otherwise, the alignment may be off if `delay!=g.Interval`
timestamp = timestamp.Add(-g.getEvalDelay())
// always apply the alignment as a last step
if g.evalAlignment == nil || *g.evalAlignment {
// align query time with interval to get similar result with grafana when plotting time series.
// see https://github.com/VictoriaMetrics/VictoriaMetrics/issues/5049