Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

GarnetClient.Info sends framed section arguments and fails for non-default sections

Open Beginner friendly
#2,222 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
78/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
csharp
Domain
backend

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.cs
  • libs/common/Metrics/InfoMetricsType.cs
  • libs/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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microsoft/garnet

All issues in microsoft/garnet

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.