You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: advance past current interval & anchor on now (#1528)
Problem
--------
* `nextNiceInterval()` used a “≥” check, so when the next “nice” value
equalled `currentMin` it returned the **same** interval.
The interval‑explorer treats an unchanged return as a terminal
condition, so exploration stopped and `suggestForecast` failed on
sample‑log data.
* Interval calculation anchored on the first **future** timestamp if one
existed, whereas run‑once / real‑time forecasting anchors on the current
time—causing the two paths to disagree on data sufficiency.
Fix
---
* Change comparison in `nextNiceInterval()` from `>=` to `>` so it always
returns the next larger interval, letting the explorer continue.
* Anchor interval calculation on the current time (`now`) instead of any
future date, making all forecast modes consistent.
Tests
-----
* Added IT
Signed-off-by: Kaituo Li <[email protected]>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,6 +11,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.1.0/)
11
11
12
12
### Bug Fixes
13
13
- Fixing concurrency bug on writer ([#1508](https://github.com/opensearch-project/anomaly-detection/pull/1508))
14
+
- fix(forecast): advance past current interval & anchor on now ([#1528](https://github.com/opensearch-project/anomaly-detection/pull/1528))
0 commit comments