Fix INFO all/default/everything returning empty response#1645
Merged
Conversation
Implement support for INFO all, default, and everything options: - all: returns all DefaultInfo sections excluding module-generated ones - default: returns the default set of sections (same as no-arg INFO) - everything: returns all DefaultInfo sections including modules Added pre-declared HashSet collections (AllInfoSet, EverythingInfoSet) in GarnetInfoMetrics.cs derived from DefaultInfo to support these options. Updated InfoCommand.cs to use UnionWith with the new HashSets instead of silently skipping the ALL keyword. Added tests for all three options, verifying correct section inclusion/exclusion. Fixes #1643 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes Garnet’s INFO command option handling so INFO ALL (and new DEFAULT / EVERYTHING keywords) return populated section output rather than an empty response, improving Redis-client/tool compatibility.
Changes:
- Added predefined section sets in
GarnetInfoMetricsto backALLandEVERYTHING. - Updated
INFOcommand parsing to union in the correct sections forALL/DEFAULT/EVERYTHING. - Expanded help text and added tests covering the new/updated option behavior.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
libs/server/Metrics/Info/GarnetInfoMetrics.cs |
Introduces section sets used by INFO option keywords. |
libs/server/Metrics/Info/InfoCommand.cs |
Implements keyword parsing so ALL/DEFAULT/EVERYTHING select sections instead of being skipped. |
libs/server/Metrics/Info/InfoHelp.cs |
Updates INFO HELP output to document new/changed keywords. |
test/Garnet.test/RespInfoTests.cs |
Adds coverage for INFO option keywords and equivalence checks. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Adds explicit asserts before splitting INFO output so test failures surface a clear message instead of a NullReferenceException. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
badrishc
approved these changes
Mar 25, 2026
1d57a91 to
7220dd3
Compare
4222d4f to
35891c1
Compare
badrishc
approved these changes
Mar 26, 2026
vazois
added a commit
that referenced
this pull request
Mar 27, 2026
* Fix INFO all/default/everything returning empty response Implement support for INFO all, default, and everything options: - all: returns all DefaultInfo sections excluding module-generated ones - default: returns the default set of sections (same as no-arg INFO) - everything: returns all DefaultInfo sections including modules Added pre-declared HashSet collections (AllInfoSet, EverythingInfoSet) in GarnetInfoMetrics.cs derived from DefaultInfo to support these options. Updated InfoCommand.cs to use UnionWith with the new HashSets instead of silently skipping the ALL keyword. Added tests for all three options, verifying correct section inclusion/exclusion. Fixes #1643 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * make everything option use DefaultInfo * Add null/empty guard in GetSectionHeaders test helper Adds explicit asserts before splitting INFO output so test failures surface a clear message instead of a NullReferenceException. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * wip; restructuring cluster tests to reduce CI duration * separate dispose from close and configure socket to allow rapid connect * ensure socket is disposed succesfully * fix failing test * update global.json --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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
Fixes #1643
\INFO all\ was returning an empty response because the \ALL\ keyword was recognized but skipped without adding any sections to the result set.
Changes
\GarnetInfoMetrics.cs\
\InfoCommand.cs\
\InfoHelp.cs\
\RespInfoTests.cs\
Behavior