[8.4] MOD-14080: Suppress info when there are zero indices (#8283)#8452
[8.4] MOD-14080: Suppress info when there are zero indices (#8283)#8452
Conversation
* 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)
| # 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) | ||
|
|
There was a problem hiding this comment.
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.
🛡️ Jit Security Scan Results✅ No security findings were detected in this PR
Security scan by Jit
|
…er dropping index Co-authored-by: Cursor <[email protected]>
|
| AddToInfo_IndexesEmpty(ctx); | ||
| AddToInfo_RSConfig(ctx); | ||
| return; | ||
| } |
There was a problem hiding this comment.
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."
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 Report✅ All modified and coverable lines are covered by tests. 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
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|





Summary
Original PR
#8283
Conflict Resolution
src/info/info_redis/info_redis.c: Added only#include "spec.h"(needed forIndexes_Count()); dropped#include "search_disk.h"which doesn't exist in this file on 8.4.src/config.h: Added onlyinfoEmitOnZeroIndexesfield and initializer; droppedsimulateInFlexwhich is from a different PR not on 8.4.src/config.c: Added onlysearch-_info-on-zero-indexesconfig registration; droppedsearch-_simulate-in-flexwhich is from a different PR.tests/pytests/test_dialect.py: Kept existingDEFAULT_DIALECT 1config SET (8.4 style) and added the newallShards_set_info_on_zero_indexescall.Made with Cursor
Note
Medium Risk
Changes
INFO MODULESoutput 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
CONFIGboolean,search-_info-on-zero-indexes, to control whetherINFO MODULESemits full RediSearch metric sections when there are zero indexes (default OFF = emit onlyversion/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 asinfo_on_zero_indexesin 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