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

fix dynamic setting of max detector/feature limit #130

Merged

Conversation

ylwu-amzn
Copy link
Contributor

Issue #, if available:

Description of changes:

  • fix dynamic setting of max detector/feature limit
PUT _cluster/settings
{
    "transient" : {
        "opendistro.anomaly_detection.max_anomaly_detectors" : 1
    }
}

Create the second detector and will get error:

{
    "error": {
        "root_cause": [
            {
                "type": "illegal_argument_exception",
                "reason": "Can't create anomaly detector more than 1"
            }
        ],
        "type": "illegal_argument_exception",
        "reason": "Can't create anomaly detector more than 1"
    },
    "status": 400
}

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@ylwu-amzn ylwu-amzn linked an issue May 20, 2020 that may be closed by this pull request
Copy link
Contributor

@yizheliu-amazon yizheliu-amazon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Just curious: it looks like such limit settings in ActionHandler doesn't work, while it works in Action, can you help me understand what's the reason behind it?

@ylwu-amzn
Copy link
Contributor Author

ylwu-amzn commented May 20, 2020

LGTM. Just curious: it looks like such limit settings in ActionHandler doesn't work, while it works in Action, can you help me understand what's the reason behind it?

Action is singleton while ActionHandler is not. We create a new ActionHandler for each request.

@ylwu-amzn ylwu-amzn merged commit 713c3af into opendistro-for-elasticsearch:master May 20, 2020
@ylwu-amzn ylwu-amzn deleted the fix_max_detector branch May 21, 2020 03:18
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.

[BUG] Can't update max detector/feature setting dynamically
3 participants