Skip to content

[8.4] MOD-13735 MOD-13181 Fix FT.PROFILE shard total profile time #8140#8150

Merged
ofiryanai merged 1 commit into8.4from
backport-8129-to-8.4
Jan 25, 2026
Merged

[8.4] MOD-13735 MOD-13181 Fix FT.PROFILE shard total profile time #8140#8150
ofiryanai merged 1 commit into8.4from
backport-8129-to-8.4

Conversation

@ofiryanai
Copy link
Contributor

@ofiryanai ofiryanai commented Jan 25, 2026

Backport of #8129 to 8.4.


Note

Fixes underreported shard timing in FT.PROFILE by accumulating intermediate cursor-read durations.

  • Update aggregate_exec.c: on cursor reads, add elapsed time to req->profileTotalTime when profiling and cursor not done; keep final read accounted in Profile_Print.
  • Add profiling helpers and tests in tests/pytests/test_profile.py to verify Total profile time >= sum(Result processors times) for SEARCH and AGGREGATE across RESP2/RESP3 and cluster/standalone.

Written by Cursor Bugbot for commit 03fc0e5. This will update automatically on new commits. Configure here.

@ofiryanai ofiryanai requested review from GuyAv46 and lerman25 January 25, 2026 08:06
@ofiryanai ofiryanai changed the base branch from master to 8.4 January 25, 2026 08:07
@ofiryanai ofiryanai force-pushed the backport-8129-to-8.4 branch from ce4f810 to 825a732 Compare January 25, 2026 08:08
* Fix FT.PROFILE shard total profile time

* Avoid double count on non-cursor Timeout Return failures

* Move out of the if (Ok | Timeout) block

* Add tests

* Enhance tests to cover more cases

(cherry picked from commit fd63e0c)
@ofiryanai ofiryanai force-pushed the backport-8129-to-8.4 branch from 825a732 to 03fc0e5 Compare January 25, 2026 08:09
@jit-ci

This comment has been minimized.

@jit-ci

This comment has been minimized.

@jit-ci
Copy link

jit-ci bot commented Jan 25, 2026

🛡️ Jit Security Scan Results

CRITICAL HIGH MEDIUM

🚨 Summary

• 'apt-get' install command missing '--no-install-recommends' flag in Dockerfile

• High severity container vulnerability detected

• Optimization needed to minimize Docker image size

🔍 Findings

HIGH - 1 finding HIGH
1. Missing '--no-install-recommends' Flag in apt-get Install
ID Type Finding File Severity
a01169b7f0 DS029 Missing '--no-install-recommends' Flag in apt-get Install - The 'apt-get install' command in the Dockerfile is not using the '--no-install-recommends' flag. This can lead to unnecessary package installations, increasing the Docker image size. Dockerfile (lines 15-19) HIGH

🔍 AI Analysis: This is an important finding because it affects the size and efficiency of the Docker image, which is a critical part of the application's infrastructure. Optimizing container size is crucial for performance and security.

Remediation:

- RUN apt-get update && apt-get install -y \
+ RUN apt-get update && apt-get install -y --no-install-recommends \
      build-essential \
      python3-pip \
      python3-setuptools \
      python3-wheel

🚫 Ignored Findings (1)

HIGH (1)
  • Image user should not be 'root' in Dockerfile — reason: ignored
    ↪ Unignore: @sera unignore 8f3af87e87

▶️ Advanced Options

Help section with supported ignore actions and syntax.

Need to ignore a finding? Use commands like:

@sera ignore <finding_id> reason:accepted (reason is optional)

@sera ignore all reason:other - this is a test PR (reason is optional)

@sera ignore type:DS029

@sera ignore type:DS002


Security scan by Jit

@codecov
Copy link

codecov bot commented Jan 25, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.92%. Comparing base (38ca112) to head (03fc0e5).
⚠️ Report is 1 commits behind head on 8.4.

Additional details and impacted files
@@            Coverage Diff             @@
##              8.4    #8150      +/-   ##
==========================================
- Coverage   85.95%   85.92%   -0.04%     
==========================================
  Files         332      332              
  Lines       52632    52634       +2     
  Branches    10850    10850              
==========================================
- Hits        45241    45226      -15     
- Misses       7248     7265      +17     
  Partials      143      143              
Flag Coverage Δ
flow 84.70% <100.00%> (-0.25%) ⬇️
unit 51.47% <0.00%> (+0.01%) ⬆️

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.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ofiryanai ofiryanai changed the title [8.4] MOD-13181 Fix FT.PROFILE shard total profile time #8140 [8.4] MOD-13735 MOD-13181 Fix FT.PROFILE shard total profile time #8140 Jan 25, 2026
@ofiryanai ofiryanai enabled auto-merge January 25, 2026 09:36
@ofiryanai ofiryanai added this pull request to the merge queue Jan 25, 2026
Merged via the queue into 8.4 with commit 71d8d69 Jan 25, 2026
29 of 30 checks passed
@ofiryanai ofiryanai deleted the backport-8129-to-8.4 branch January 25, 2026 11:15
alonre24 added a commit to alonre24/redis that referenced this pull request Jan 26, 2026
**Bug Fixes:**

* [redis#7385](RediSearch/RediSearch#7385) Fix high temporary memory consumption when loading multiple search indexes from RDB
* [redis#7430](RediSearch/RediSearch#7430) Fix a potential deadlock in `FT.HYBRID` in cluster mode during updates.
* [redis#7454](RediSearch/RediSearch#7454) Fix a garbage collection performence regression
* [redis#7460](RediSearch/RediSearch#7460) Fix potential double-free in Fork GC error paths
* [redis#7455](RediSearch/RediSearch#7455) Fix internal cursors not being deleted promptly in cluster mode
* [redis#7667](RediSearch/RediSearch#7667) Fix a cursor logical leak upon dropping the index
* [redis#7796](RediSearch/RediSearch#7796) Fix a potential use-after-free when removing connections
* [redis#7792](RediSearch/RediSearch#7792) Fix string comparison for binary data with embedded NULLs in TOLIST reducer in FT.AGGREGATE
* [redis#7823](RediSearch/RediSearch#7823) Update `FT.HYBRID` to accept vector blobs only via parameters
* [redis#7903](RediSearch/RediSearch#7903) Fix a memory leak in Hybrid ASM
* [redis#8052](RediSearch/RediSearch#8052) Fix `FT.HYBRID` behavior when used with `LOAD *`
* [redis#8082](RediSearch/RediSearch#8082) Fix incorrect FULLTEXT field metric counts
* [redis#8089](RediSearch/RediSearch#8089) Fix an edge case in `CLUSTERSET` handling
* [redis#8152](RediSearch/RediSearch#8152) Fix configuration registration issues

**Improvements:**

* [redis#7427](RediSearch/RediSearch#7427) Enhance `FT.PROFILE` with vector search execution details
* [redis#7431](RediSearch/RediSearch#7431) Ensure full `FT.PROFILE` output is returned on timeout with RETURN policy
* [redis#7507](RediSearch/RediSearch#7507) Track timeout warnings and errors in INFO
* [redis#7576](RediSearch/RediSearch#7576) Track OOM warnings and errors in INFO
* [redis#7612](RediSearch/RediSearch#7612) Track `maxprefixexpansions` warnings and errors in INFO
* [redis#7960](RediSearch/RediSearch#7960) Persist query warnings across cursor reads
* [redis#7551](RediSearch/RediSearch#7551), [redis#7616](RediSearch/RediSearch#7616), [redis#7622](RediSearch/RediSearch#7622), [redis#7625](RediSearch/RediSearch#7625) Add runtime thread and pending-jobs metrics
* [redis#7589](RediSearch/RediSearch#7589) Support multiple slot ranges in `search.CLUSTERSET`
* [redis#7707](RediSearch/RediSearch#7707) Add `WITHCOUNT` support to `FT.AGGREGATE`
* [redis#7862](RediSearch/RediSearch#7862) Add support for subquery `COUNT` in `FT.HYBRID`
* [redis#8087](RediSearch/RediSearch#8087) Add warnings when cursor results may be affected by ASM and expose ASM warnings in `FT.PROFILE`
* [redis#8049](RediSearch/RediSearch#8049) Add logging for index-related commands
* [redis#8150](RediSearch/RediSearch#8150) Fix shard total profile time reporting in `FT.PROFILE`
YaacovHazan pushed a commit to redis/redis that referenced this pull request Jan 26, 2026
**Bug Fixes:**

* [#7385](RediSearch/RediSearch#7385) Fix high
temporary memory consumption when loading multiple search indexes from
RDB
* [#7430](RediSearch/RediSearch#7430) Fix a
potential deadlock in `FT.HYBRID` in cluster mode during updates.
* [#7454](RediSearch/RediSearch#7454) Fix a
garbage collection performence regression
* [#7460](RediSearch/RediSearch#7460) Fix
potential double-free in Fork GC error paths
* [#7455](RediSearch/RediSearch#7455) Fix
internal cursors not being deleted promptly in cluster mode
* [#7667](RediSearch/RediSearch#7667) Fix a
cursor logical leak upon dropping the index
* [#7796](RediSearch/RediSearch#7796) Fix a
potential use-after-free when removing connections
* [#7792](RediSearch/RediSearch#7792) Fix string
comparison for binary data with embedded NULLs in TOLIST reducer in
FT.AGGREGATE
* [#7704](RediSearch/RediSearch#7704) Use
asynchronous jobs for GC in SVS to accelerate execution
* [#7823](RediSearch/RediSearch#7823) Update
`FT.HYBRID` to accept vector blobs only via parameters
* [#7903](RediSearch/RediSearch#7903) Fix a
memory leak in Hybrid ASM
* [#8052](RediSearch/RediSearch#8052) Fix
`FT.HYBRID` behavior when used with `LOAD *`
* [#8082](RediSearch/RediSearch#8082) Fix
incorrect FULLTEXT field metric counts
* [#8089](RediSearch/RediSearch#8089) Fix an
edge case in `CLUSTERSET` handling
* [#8152](RediSearch/RediSearch#8152) Fix
configuration registration issues

**Improvements:**

* [#7427](RediSearch/RediSearch#7427) Enhance
`FT.PROFILE` with vector search execution details
* [#7431](RediSearch/RediSearch#7431) Ensure
full `FT.PROFILE` output is returned on timeout with RETURN policy
* [#7507](RediSearch/RediSearch#7507) Track
timeout warnings and errors in INFO
* [#7576](RediSearch/RediSearch#7576) Track OOM
warnings and errors in INFO
* [#7612](RediSearch/RediSearch#7612) Track
`maxprefixexpansions` warnings and errors in INFO
* [#7960](RediSearch/RediSearch#7960) Persist
query warnings across cursor reads
* [#7551](RediSearch/RediSearch#7551),
[#7616](RediSearch/RediSearch#7616),
[#7622](RediSearch/RediSearch#7622),
[#7625](RediSearch/RediSearch#7625) Add runtime
thread and pending-jobs metrics
* [#7589](RediSearch/RediSearch#7589) Support
multiple slot ranges in `search.CLUSTERSET`
* [#7707](RediSearch/RediSearch#7707) Add
`WITHCOUNT` support to `FT.AGGREGATE`
* [#7862](RediSearch/RediSearch#7862) Add
support for subquery `COUNT` in `FT.HYBRID`
* [#8087](RediSearch/RediSearch#8087) Add
warnings when cursor results may be affected by ASM and expose ASM
warnings in `FT.PROFILE`
* [#8049](RediSearch/RediSearch#8049) Add
logging for index-related commands
* [#8150](RediSearch/RediSearch#8150) Fix shard
total profile time reporting in `FT.PROFILE`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants