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
parent b60bb1d98a
commit 3aec7eb44f
No known key found for this signature in database
GPG key ID: 3BF75F3741CA9640

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