GarnetClient.Info sends framed section arguments and fails for non-default sections
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
Research direction
Start with GarnetClientAdminCommands.cs and trace how GarnetClient.Info passes section bytes to the argument writer; compare with GetRespFormattedInfoSection in InfoMetricsType.cs and the writer in GarnetClient.cs. Run or add coverage for the MEMORY and STATS reproductions, then confirm the default Info() call still works and cached section bytes are preserved without per-call allocations.
Written by the indexing model from the issue text.
Description
Problem
GarnetClient.Info adds bulk-string framing twice to non-default section arguments.
GetRespFormattedInfoSection returns an already formatted argument, but the client argument writer expects raw bytes and formats it again. The server receives the framing as part of the section name and rejects it.
Reproduction
Connect GarnetClient to a running Garnet server and call:
await client.Info(InfoMetricsType.MEMORY);
await client.Info(InfoMetricsType.STATS);
The calls throw ERR Invalid section $6 and ERR Invalid section $5, respectively.
These control calls succeed against the same server:
await client.ExecuteForStringResultAsync("INFO", ["MEMORY"]);
await client.ExecuteForStringResultAsync("INFO", ["STATS"]);
await client.Info();
Expected behavior
Send raw section names to the argument writer so they are framed once. Preserve cached section bytes without adding per-call allocations.
Scope
This affects applications requesting non-default sections through GarnetClient.Info. The default call omits the section argument and succeeds. Correctly formed commands from StackExchange.Redis, redis-cli, or other clients are unaffected.
Evidence
The failures were reproduced against a real Garnet server without production changes. Generic-command controls and the default convenience call passed in the same test run.
Affected files:
libs/client/GarnetClientAPI/GarnetClientAdminCommands.cslibs/common/Metrics/InfoMetricsType.cslibs/client/GarnetClient.cs
Related: #2221 reports the similar failover option-framing defect. These callers can be reproduced and fixed independently.
- Dominant language
- C#
- Stars
- 12k
- Forks
- 709
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 62
Getting set up
- Ships a Dockerfile or Docker Compose file
- No pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoft/garnet
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 55/100
Maintainers usually reply within 1 day
-
A log scan whose end lies inside a disk-resident record returns that record truncatedPossibly taken @TedHartMS claimed this 1 day ago. Open
microsoft/garnet#2219 · 1 assignee ·
Maintainers usually reply within 1 day
-
KEYS / SCAN / DBSIZE inside MULTI after a write hang forever, pin a core and leave the key lockedOpen
Difficulty 4/5 3-5 days Newbie friendliness 48/100
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 52/100
Maintainers usually reply within 1 day
All issues in microsoft/garnet
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
stryker-mutator/stryker-net#3892 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
MobiFlight/MobiFlight-Connector#3419 ·
Maintainers usually reply within 1 day
-
documentation
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Kryptos-FR/MarkView.Avalonia#105 ·
Maintainers usually reply within 1 day
-
[辞書]Open提案 辞書
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 1 day