[8.2] MOD-14081: Suppress info when there are zero indices (#8283)#8453
Merged
[8.2] MOD-14081: Suppress info when there are zero indices (#8283)#8453
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)
🛡️ Jit Security Scan Results✅ No security findings were detected in this PR
Security scan by Jit
|
Co-authored-by: Cursor <[email protected]>
Co-authored-by: Cursor <[email protected]>
…er dropping index Co-authored-by: Cursor <[email protected]>
|
Codecov Report✅ All modified and coverable lines are covered by tests. 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
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:
|
nafraf
approved these changes
Feb 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



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.2.src/config.h: Added onlyinfoEmitOnZeroIndexesfield and initializer; droppedsimulateInFlex, trim delay fields (minTrimDelayMS,maxTrimDelayMS,trimmingStateCheckDelayMS), andoomPolicyinitializer which are from different PRs not on 8.2.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.2 style) and added the newallShards_set_info_on_zero_indexescall.Made with Cursor
Note
Medium Risk
Changes the shape/content of
INFO MODULESoutput 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-indexesis OFF (default) and there are no indexes,INFO MODULESnow returns a minimal RediSearch output (version + zeroedindexessection +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 newIndexes_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