Skip to content

Count Queries - [MOD-6492]#5072

Merged
GuyAv46 merged 12 commits into2.10from
guyav-count_queries
Oct 13, 2024
Merged

Count Queries - [MOD-6492]#5072
GuyAv46 merged 12 commits into2.10from
guyav-count_queries

Conversation

@GuyAv46
Copy link
Collaborator

@GuyAv46 GuyAv46 commented Oct 1, 2024

Describe the changes in the pull request

Add new statistic fields to the redis info command (modules' section)

  1. "search_total_queries_processed" - The total number of successful query executions (When using cursors, not counting reading from existing cursors)
  2. "search_total_query_commands" - The total number of successful query commands execution (including FT.SEARCH, FT.AGGREGATE, and FT.CURSOR READ)

In cluster mode, both counters are local (shard counters) and should be summed up to get the total cluster statistics

Main objects this PR modified

  1. New global statistics struct
  2. Moving field stats from the configuration struct

Mark if applicable

  • This PR introduces API changes
  • This PR introduces serialization changes

@GuyAv46 GuyAv46 requested a review from alonre24 October 6, 2024 13:55
@GuyAv46 GuyAv46 marked this pull request as ready for review October 6, 2024 14:03
@codecov
Copy link

codecov bot commented Oct 6, 2024

Codecov Report

Attention: Patch coverage is 92.56198% with 9 lines in your changes missing coverage. Please review.

Project coverage is 86.24%. Comparing base (c4a9c73) to head (9d1ef3f).
Report is 8 commits behind head on 2.10.

Files with missing lines Patch % Lines
src/global_stats.c 91.26% 9 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             2.10    #5072   +/-   ##
=======================================
  Coverage   86.24%   86.24%           
=======================================
  Files         191      191           
  Lines       34102    34119   +17     
=======================================
+ Hits        29410    29427   +17     
  Misses       4692     4692           
Flag Coverage Δ
?

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@GuyAv46 GuyAv46 requested a review from meiravgri October 6, 2024 17:27
Copy link
Collaborator

@meiravgri meiravgri left a comment

Choose a reason for hiding this comment

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

Very clean :) !!
My main concern is regarding the aggregated field (that include also ft.cursor read), see comment in module-init.

@GuyAv46 GuyAv46 added this pull request to the merge queue Oct 13, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 13, 2024
@GuyAv46 GuyAv46 added this pull request to the merge queue Oct 13, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 13, 2024
@GuyAv46 GuyAv46 added this pull request to the merge queue Oct 13, 2024
Merged via the queue into 2.10 with commit 1006065 Oct 13, 2024
@GuyAv46 GuyAv46 deleted the guyav-count_queries branch October 13, 2024 11:36
GuyAv46 added a commit that referenced this pull request Nov 3, 2024
github-merge-queue bot pushed a commit that referenced this pull request Nov 4, 2024
* complete CP of "Count Queries" (#5072) content

* always count query execution time (on non-internal commands)

* add test

* give more time

* review fixes
redisearch-backport-pull-request bot pushed a commit that referenced this pull request Nov 4, 2024
* complete CP of "Count Queries" (#5072) content

* always count query execution time (on non-internal commands)

* add test

* give more time

* review fixes

(cherry picked from commit 97f34e2)
GuyAv46 added a commit that referenced this pull request Nov 4, 2024
* complete CP of "Count Queries" (#5072) content

* always count query execution time (on non-internal commands)

* add test

* give more time

* review fixes

(cherry picked from commit 97f34e2)
github-merge-queue bot pushed a commit that referenced this pull request Nov 4, 2024
Add a counter of total query execution time - [MOD-7961] (#5145)

* complete CP of "Count Queries" (#5072) content

* always count query execution time (on non-internal commands)

* add test

* give more time

* review fixes

(cherry picked from commit 97f34e2)

Co-authored-by: GuyAv46 <[email protected]>
github-merge-queue bot pushed a commit that referenced this pull request Nov 4, 2024
* Add a counter of total query execution time - [MOD-7961] (#5145)

* complete CP of "Count Queries" (#5072) content

* always count query execution time (on non-internal commands)

* add test

* give more time

* review fixes

(cherry picked from commit 97f34e2)

* add missing if
alonre24 pushed a commit that referenced this pull request Dec 27, 2024
* Add a counter of total query execution time - [MOD-7961] (#5145)

* complete CP of "Count Queries" (#5072) content

* always count query execution time (on non-internal commands)

* add test

* give more time

* review fixes

(cherry picked from commit 97f34e2)

* add missing if

(cherry picked from commit d45365d)
github-merge-queue bot pushed a commit that referenced this pull request Jan 1, 2025
* CP Count Queries - [MOD-6492]

* [2.10] Add metrics of min and max memory consumption of indexes - [MOD-7584] (#5146)

Add metrics of min and max memory consumption of indexes - [MOD-7584] (#5143)

* implement min and max memory usage metrics

* added to info module test

(cherry picked from commit b0d56ad)

Co-authored-by: GuyAv46 <[email protected]>
(cherry picked from commit 094318f)

* [2.10] Add a counter of total query execution time - [MOD-7961] (#5153)

* Add a counter of total query execution time - [MOD-7961] (#5145)

* complete CP of "Count Queries" (#5072) content

* always count query execution time (on non-internal commands)

* add test

* give more time

* review fixes

(cherry picked from commit 97f34e2)

* add missing if

(cherry picked from commit d45365d)

* CP [MOD-8034] expose indexing failures to INFO modules

* [2.10] Add VecSim related metrics - [MOD-7967] (#5169)

Add VecSim related metrics - [MOD-7967] (#5151)

* added vector info

* added a test

* drain work queue before checking memory

* move vector metrics info field statistics section

* fix test

* fix test

* tidy up

* added a flat index to the test

(cherry picked from commit 388f81e)

Co-authored-by: GuyAv46 <[email protected]>
(cherry picked from commit 242f314)

* CP Add Active Indices Metrics - [MOD-7952]

* CP Add global marked deleted to stats [MOD-6053]

* CP Fork gc code cleanup (PR #4263) to enable GC mechanism that will allow the test of marked deleted info to pass

* CP [MOD-8152] rename and move new metrics

* CP [MOD-8035] Add field index error for JSON field indexing failures

* CP [MOD-8039] Reorganize stats files

* [2.10] Improve counting active writes - [MOD-8151] (#5362)

Improve counting active writes - [MOD-8151] (#5354)

* improve counting active writes

* add a test

(cherry picked from commit 2b5182d)

Co-authored-by: GuyAv46 <[email protected]>
(cherry picked from commit a3d447d)

* Update mem usage computation to align to 2.10

* revert bad additions (CR)

* revert bad additions (CR) 2

* Better memory check in info vecsim (since mac failed)

* Fix syntax error

---------

Co-authored-by: redisearch-backport-pull-request[bot] <182669528+redisearch-backport-pull-request[bot]@users.noreply.github.com>
Co-authored-by: GuyAv46 <[email protected]>
Co-authored-by: meiravgri <[email protected]>
raz-mon added a commit that referenced this pull request Jan 30, 2025
This reverts commit a97e925.

Revert "[2.10] MOD-8601: Fix error message for LOAD (#5531) (#5550)"

This reverts commit 5748233.

Revert "[2.10] MOD-8561: Fix Inverted Index SeekTo Edge Case (#5536)"

This reverts commit f9923b7.

Revert "[2.10] Fix legacy geofilter leak - [MOD-8568] (#5516)"

This reverts commit 8b75285.

Revert "[2.10] MOD-7872: Add Types To Hide User Input (#5485)"

This reverts commit d6acfed.

Revert "[2.10] MOD-7864: Obfuscation API (#5487)"

This reverts commit 259d417.

Revert "MOD-7570 Backport 5422 to 2.10 (#5472)"

This reverts commit e699dbc.

Revert "[2.10] [MOD-8462] rename total_active_writes -> total_active_write_threads (#5446)"

This reverts commit a90cfc3.

Revert "[2.10] MOD-8058: Avoid error with _NUM_SSTRING (#5424)"

This reverts commit 885cffb.

Revert "[2.10] MOD-7634: Fix NOSTEM (#5392)"

This reverts commit 4df508d.

Revert "[2.10] Fixes for inverted indexes encoding - [MOD-8248] (#5388)"

This reverts commit bc003c1.

Revert "[2.10] Improve "Raw doc id" encoding - [MOD-8255] (#5372)"

This reverts commit 9789e30.

Revert "[2.10] Improve SkipToBlock logic - [MOD-8255] (#5370)"

This reverts commit 56b16ea.

Revert "[2.10] Improve counting active writes - [MOD-8151] (#5362)"

This reverts commit a3d447d.

Revert "[2.10] [MOD-8039] Reorganize stats files (#5356)"

This reverts commit a1b8b29.

Revert "[2.10] Improve text indexing performance - [MOD-8249] (#5352)"

This reverts commit c5c9245.

Revert "[2.10] [MOD-8115] Free spec resources in the main thread (#5327)"

This reverts commit 42bb520.

Revert "[2.10] Sorting Vector - [MOD-6783] (#5314)"

This reverts commit 166a00e.

Revert "[2.10] Fix long PREFIX/SUFFIX/INFIX/WILDCARD queries - [MOD-7882] (#5300)"

This reverts commit 5c4ed74.

Revert "[2.10] Remove assertion in optimizer (#5292)"

This reverts commit ba55efb.

Revert "[2.10] Fix missing expansions in text queries - [MOD-8142] (#5284)"
This reverts commit 10f32d3.

Revert "[2.10] Fix Tag OnReopen Callback - [MOD-8011] (#5282)"

This reverts commit 2c029ee.

Revert "[2.10] Fix MRIterator ownership mechanism - [MOD-8108] (#5266)"

This reverts commit 457536e.

Revert "[2.10] [MOD-8125] Create inverted index in write operations only (#5257)"

This reverts commit 555557c.

Revert "[2.10] [MOD-8152] rename and move new metrics (#5255)"

This reverts commit a1f460e.

Revert "[2.10] MOD-8129: Fix indexed_percent info stat (#5247)"

This reverts commit d55afb5.

Revert "[2.10] MOD-8097, MOD-8114 Fix memory counting (#5204) (#5241)"

This reverts commit 52e58af.

Revert "[MOD-7949] Avoid lazy expire upon scan keys in background [2.10] (#5294)"

This reverts commit 6dfb503.

Revert "[2.10] Cleanup for the trimming tree logic (#5226)"

This reverts commit 7dfe6a2.

Revert "[2.10] Add global marked deleted to stats [MOD-6053] (#5208)"

This reverts commit f396732.

Revert "Fix and add skips in pytest (#5210)"

This reverts commit a8b505c.

Revert "[2.10] [MOD-8035] Add field index error for JSON field indexing failures (#5202)"

This reverts commit ed1919e.

Revert "[2.10] Improve usage of RedisModuleCtx (#5181)"

This reverts commit 8e686c7.

Revert "[2.10] Add Active Indices Metrics - [MOD-7952] (#5179)"

This reverts commit b72fc38.

Revert "[2.10] MOD-8009: Allow Users To Configure Cursor Index Limitation Through Global Config (#5166)"

This reverts commit 92e1dd8.

Revert "[2.10] Send `SCORER` to the shards with `FT.AGGREGATE` on cluster mode - [MOD-8060] (#5163)"

This reverts commit 4982ea2.

Revert "[2.10] [MOD-8034] expose indexing failures to INFO modules (#5158)"

This reverts commit d03f8de.

Revert "[2.10] Add a counter of total query execution time - [MOD-7961] (#5153)"

This reverts commit d45365d.

Revert "[2.10] Add metrics of min and max memory consumption of indexes - [MOD-7584] (#5146)"

This reverts commit 094318f.

Revert "[2.10] Remove an unnecessary assertion - [MOD-8008] (#5142)"

This reverts commit 3156f08.

Revert "[2.10] Skip test_multithread:test_async_updates_sanity with sanitizer  (#5125)"

This reverts commit 5339033.

Revert "Count Queries - [MOD-6492] (#5072)"

This reverts commit 1006065.

Revert "[2.10] Improve Error Message on VecSim Syntax Error - [MOD-7887] (#5109)"

This reverts commit 9621fdc.

Revert "[2.10] Fix flaky test (#5086)"

This reverts commit 5aff118.

Revert "[2.10] Fix flaky test_async_updates_sanity - avoid timeout in force invoke GC [MOD-7867] (#5081)"

This reverts commit 2b85289.

Revert "[2.10] MOD-7745: Add Benchmarks For Document And Field Expiration (#5063)"

This reverts commit f99b0cf.

Revert "[2.10] MOD-7863: Add HPEXPIRETIME Mock Support (#5028)"

This reverts commit 79dfd0f.
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