Skip to content

[8.4] MOD-14080: Suppress info when there are zero indices (#8283)#8452

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

[8.4] MOD-14080: Suppress info when there are zero indices (#8283)#8452
nafraf merged 2 commits into8.4from
backport-8283-to-8.4

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.4.
  • src/config.h: Added only infoEmitOnZeroIndexes field and initializer; dropped simulateInFlex which is from a different PR not on 8.4.
  • 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.4 style) and added the new allShards_set_info_on_zero_indexes call.

Made with Cursor


Note

Medium Risk
Changes INFO MODULES output shape based on a new runtime config, which may impact monitoring/parsing expectations and test assumptions, but is gated and leaves crash-report info unaffected.

Overview
Adds a new runtime CONFIG boolean, search-_info-on-zero-indexes, to control whether INFO MODULES emits full RediSearch metric sections when there are zero indexes (default OFF = emit only version/indexes/runtime_configurations; crash-report output remains unsuppressed).

Updates the INFO implementation to use Indexes_Count() consistently, adds an explicit “empty indexes” section helper, and exposes the toggle state as info_on_zero_indexes in the runtime configurations section. Pytests are updated to cover the new config behavior and to force “full” INFO output in tests that read metrics before creating indexes (including cluster helpers to set the config on all shards).

Written by Cursor Bugbot for commit cf25e06. 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)
@oshadmi oshadmi requested a review from nafraf February 23, 2026 17:51
Comment thread tests/pytests/common.py
# We only query INFO MODULES on the current connection, so it's enough to set this locally
# (no need to broadcast to all shards).
shard_set_info_on_zero_indexes(env, True)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Dialect discovery may query wrong shard

Medium Severity

In set_max_dialect, shard_set_info_on_zero_indexes(env, True) applies CONFIG SET only to the connection returned by getConnectionByEnv(env), but the subsequent env.cmd('INFO', 'MODULES') may execute on a different node in cluster mode. This can reintroduce the “minimal INFO” output and make dialect discovery flaky.

Fix in Cursor Fix in Web

@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

@sonarqubecloud
Copy link
Copy Markdown

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.

AddToInfo_IndexesEmpty(ctx);
AddToInfo_RSConfig(ctx);
return;
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Missing release note for user-facing behavior change

Low Severity

The project rule requires assisting in writing a GitHub release note. This PR introduces a user-facing behavior change: INFO MODULES now suppresses most RediSearch metrics when no indexes are defined (default behavior). A suggested release note: "RediSearch INFO MODULES output is now reduced when no search indexes exist, emitting only version, index count, and runtime configuration sections. To restore full metrics output, set CONFIG SET search-_info-on-zero-indexes yes. Crash-report information is never suppressed."

Fix in Cursor Fix in Web

Triggered by project rule: Please assist in writing a GitHub release note for this PR, which is concise and focused on the user impact.

@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 85.49%. Comparing base (dca18a5) to head (cf25e06).
⚠️ Report is 4 commits behind head on 8.4.

Additional details and impacted files
@@            Coverage Diff             @@
##              8.4    #8452      +/-   ##
==========================================
- Coverage   85.51%   85.49%   -0.02%     
==========================================
  Files         337      337              
  Lines       53274    53352      +78     
  Branches    11023    11023              
==========================================
+ Hits        45556    45613      +57     
- Misses       7575     7596      +21     
  Partials      143      143              
Flag Coverage Δ
flow 84.41% <100.00%> (-0.49%) ⬇️
unit 51.06% <0.00%> (+0.03%) ⬆️

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.

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