Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,7 @@ Compatible with OpenSearch 3.1.0
- Use Centralized Resource Access Control framework provided by security plugin ([#1400](https://github.com/opensearch-project/anomaly-detection/pull/1400))
- Introduce state machine, separate config index, improve suggest/validate APIs, and persist cold-start results for run-once visualization ([#1479](https://github.com/opensearch-project/anomaly-detection/pull/1479))

### Bug Fixes
- Fix incorrect task state handling in ForecastRunOnceTransportAction ([#1489](https://github.com/opensearch-project/anomaly-detection/pull/1489))


Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,10 @@ public static List<ForecastResult> fromRawRCFCasterResult(
) {
int inputLength = featureData.size();
int numberOfForecasts = 0;
// it is possible we might get all 0 forecast even though dataQuality is 0 at the beginning
// it is possible we might get all 0 forecast when dataQuality is 0 at the beginning.
// it is also possible we get non-zero forecast and dataQuality is 0 when we have
// processed more than outputAfter length of data.
// We will ignore forecast values when dataQuality is 0.
if (forecastsValues != null && dataQuality > 0) {
numberOfForecasts = forecastsValues.length / inputLength;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ private void performSearchWithRetry(String forecastID, String taskId, SearchRequ
if (r.isPresent()) {
String state = r.get().getState();
// If there is no state, update it; otherwise, it might have been set elsewhere (e.g., by ColdStartWorker)
if (Strings.isEmpty(state)) {
if (Strings.isEmpty(state) || TaskState.NOT_ENDED_STATES.contains(state)) {
updateTask(forecastID, taskId, TaskState.INIT_TEST_FAILED, exceptionMsg);
}
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ public static SearchSourceBuilder addUserBackendRolesFilter(User user, SearchSou
*/
public static User getUserContext(Client client) {
String userStr = client.threadPool().getThreadContext().getTransient(ConfigConstants.OPENSEARCH_SECURITY_USER_INFO_THREAD_CONTEXT);
logger.info("Filtering result by " + userStr);
logger.debug("Filtering result by " + userStr);
return User.parse(userStr);
}

Expand Down
Loading