Skip to content

[8.2] MOD-14081: Suppress info when there are zero indices (#8283)#8453

Merged
oshadmi merged 4 commits into8.2from
backport-8283-to-8.2
Feb 25, 2026
Merged

[8.2] MOD-14081: Suppress info when there are zero indices (#8283)#8453
oshadmi merged 4 commits into8.2from
backport-8283-to-8.2

Conversation

@oshadmi
Copy link
Copy Markdown
Collaborator

@oshadmi oshadmi commented Feb 23, 2026

Summary

Original PR

#8283

Conflict Resolution

  • src/info/info_redis/info_redis.c: Added only #include "spec.h" (needed for Indexes_Count()); dropped #include "search_disk.h" which doesn't exist in this file on 8.2.
  • src/config.h: Added only infoEmitOnZeroIndexes field and initializer; dropped simulateInFlex, trim delay fields (minTrimDelayMS, maxTrimDelayMS, trimmingStateCheckDelayMS), and oomPolicy initializer which are from different PRs not on 8.2.
  • src/config.c: Added only search-_info-on-zero-indexes config registration; dropped search-_simulate-in-flex which is from a different PR.
  • tests/pytests/test_dialect.py: Kept existing DEFAULT_DIALECT 1 config SET (8.2 style) and added the new allShards_set_info_on_zero_indexes call.

Made with Cursor


Note

Medium Risk
Changes the shape/content of INFO MODULES output in the zero-index case, which may affect monitoring/automation that expects specific metrics fields; otherwise the change is gated by a config and avoids crash-report paths.

Overview
When CONFIG search-_info-on-zero-indexes is OFF (default) and there are no indexes, INFO MODULES now returns a minimal RediSearch output (version + zeroed indexes section + runtime_configurations) and skips emitting the usual metrics sections; crash-report INFO is unaffected.

This introduces the new boolean config RSGlobalConfig.infoEmitOnZeroIndexes, switches index counting in INFO to a new Indexes_Count() helper, and adds coverage/tests plus test harness helpers to toggle the config so existing tests that read metrics before creating indexes remain stable.

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

Release Notes

  • This PR requires release notes
  • This PR does not require release notes

* MOD-13903: Supress info when there are zero indices

* Fix failures with zero indices relying on info

* Cleanup redundant comment

* Move assert success inside allShards_set_info_on_zero_indexes and use simpler shard_set_info_on_zero_indexes

* Move config set to the caller of check_info_module_results

* Move 'search-_simulate-in-flex' to booleanConfigs

* Test a subset of info sections when supression is disabled

* Remove 'search-_simulate-in-flex' from booleanConfigs in test_config.py

(cherry picked from commit 95f87e7)
Comment thread src/info/info_redis/info_redis.c
Comment thread src/info/info_redis/info_redis.c
@jit-ci
Copy link
Copy Markdown

jit-ci Bot commented Feb 23, 2026

🛡️ Jit Security Scan Results

CRITICAL HIGH MEDIUM

✅ No security findings were detected in this PR


Security scan by Jit

@oshadmi oshadmi requested a review from nafraf February 23, 2026 17:52
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Comment thread src/config.c
@sonarqubecloud
Copy link
Copy Markdown

@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 25, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.93%. Comparing base (42a722a) to head (7cd71f6).
⚠️ Report is 2 commits behind head on 8.2.

Additional details and impacted files
@@            Coverage Diff             @@
##              8.2    #8453      +/-   ##
==========================================
- Coverage   88.98%   88.93%   -0.06%     
==========================================
  Files         259      260       +1     
  Lines       41961    41988      +27     
  Branches     3851     3851              
==========================================
+ Hits        37340    37341       +1     
- Misses       4572     4598      +26     
  Partials       49       49              
Flag Coverage Δ
flow 81.99% <100.00%> (-0.30%) ⬇️
unit 46.76% <0.00%> (-0.04%) ⬇️

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.

@oshadmi oshadmi added this pull request to the merge queue Feb 25, 2026
Merged via the queue into 8.2 with commit 9c2ee68 Feb 25, 2026
34 checks passed
@oshadmi oshadmi deleted the backport-8283-to-8.2 branch February 25, 2026 17:13
@oshadmi oshadmi changed the title [8.2] MOD-13903: Suppress info when there are zero indices (#8283) [8.2] MOD-14081: Suppress info when there are zero indices (#8283) Mar 9, 2026
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