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

Use in-memory count for total hits in patterns ratio #1254

Merged
merged 1 commit into from
Nov 4, 2022

Conversation

joshuali925
Copy link
Member

@joshuali925 joshuali925 commented Nov 4, 2022

Signed-off-by: Joshua Li joshuali925@gmail.com

Description

Patterns was using total hits from hits counter since prometheus doesn't support stats count(), but hits counter will refresh if filtered by pattern, and the ratio becomes incorrect.

Issues Resolved

closes #1251

Check List

  • New functionality includes testing.
    • All tests pass, including unit test, integration test and doctest
  • New functionality has been documented.
    • New functionality has javadoc added
    • New functionality has user manual doc added
  • Commits are signed per the DCO using --signoff

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.

Signed-off-by: Joshua Li <joshuali925@gmail.com>
@joshuali925 joshuali925 requested a review from a team as a code owner November 4, 2022 16:20
}

export function PatternsTable(props: PatternsTableProps) {
const { tableData, tabId, onPatternSelection, query } = props;
const patternsData = useSelector(selectPatterns)[tabId];
Copy link
Collaborator

Choose a reason for hiding this comment

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

was patternsData just never used?

Copy link
Member Author

Choose a reason for hiding this comment

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

patternsData used to contain the results of stats count() as total hit, forgot to remove it since i removed stats count() call

@joshuali925 joshuali925 merged commit 625433f into opensearch-project:2.4 Nov 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants