Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make default window size valid for all metric types #156

Merged
merged 1 commit into from
Nov 12, 2024

Conversation

deshsidd
Copy link
Collaborator

Description

The default window size for latency, cpu and memory is 60s hardcoded on the backend:

public static final TimeValue DEFAULT_WINDOW_SIZE = new TimeValue(60, TimeUnit.SECONDS);

The valid window sizes are defined as:

public static final Set<TimeValue> VALID_WINDOW_SIZES_IN_MINUTES = new HashSet<>(
        Arrays.asList(
            new TimeValue(1, TimeUnit.MINUTES),
            new TimeValue(5, TimeUnit.MINUTES),
            new TimeValue(10, TimeUnit.MINUTES),
            new TimeValue(30, TimeUnit.MINUTES)
        )
    );

The default window size is not a valid window size based on the above.

This will break the QI dashboard since the dashboard only parses timeunit m and h:
https://github.com/opensearch-project/query-insights-dashboards/blob/main/public/pages/TopNQueries/TopNQueries.tsx#L192

Issues Resolved

Closes: #155

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@dzane17 dzane17 merged commit d2d20e4 into opensearch-project:main Nov 12, 2024
16 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Nov 18, 2024
Signed-off-by: Siddhant Deshmukh <[email protected]>
(cherry picked from commit d2d20e4)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Default window size is not a valid window size
3 participants