Skip to content

[code sync] Merge code from sonic-net/sonic-gnmi:master to kubesonic - #235

Merged
mssonicbld merged 2 commits into
Azure:kubesonicfrom
mssonicbld:sonicbld/kubesonic-merge
Sep 18, 2026
Merged

mssonicbld merged 2 commits into
Azure:kubesonicfrom
mssonicbld:sonicbld/kubesonic-merge

Conversation

@mssonicbld

Copy link
Copy Markdown
Collaborator
* d7837b7 - (origin/master, origin/HEAD, test, master) Make redis client pool size configurable via GNMI_REDIS_POOL_SIZE (#706) (2026-09-16) [Michael Ma]<br>```

* Make redis client pool size configurable via GNMI_REDIS_POOL_SIZE

After the go-redis v9 migration (#528), each redis client defaults its
PoolSize to 10*GOMAXPROCS, which scales with logical CPUs. GNMI creates
one client per DB per namespace, so telemetry RSS grows with CPU count
(sonic-net/sonic-buildimage#26825).

Add dbconfig.ApplyRedisPoolSize() which sets PoolSize from the
GNMI_REDIS_POOL_SIZE env var. When the var is unset or invalid, the
default pool size is left unchanged. Applied to all production redis
client creations.

Signed-off-by: Michael Ma <kema2@microsoft.com>

* Address review comments

- redis_pool.go: drop package-doc form on second file; separate parse-error
  from non-positive value in the warning; add unit tests
- notification_producer.go: remove dead redis.NewClient nil check and now-unused fmt import
- connection_manager.go: use table constant and handle HGetAll error

Signed-off-by: Michael Ma <kema2@microsoft.com>

* [redis]: Keep pool configuration pure

Move the Redis pool option helper into internal/redisopts so pure packages do not pull in SONiC database dependencies.

Copilot-Session: 3370a3d4-d863-4ca6-93a6-1a11592a89bb
Signed-off-by: Michael Ma <kema2@microsoft.com>

* [redis]: Centralize common option configuration

Route every production redis.Options construction through redisopts.New so future shared settings only require one implementation change.

Copilot-Session: 3370a3d4-d863-4ca6-93a6-1a11592a89bb
Signed-off-by: Michael Ma <kema2@microsoft.com>

---------

Signed-off-by: Michael Ma <kema2@microsoft.com>
Copilot-Session: 3370a3d4-d863-4ca6-93a6-1a11592a89bb
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

@mssonicbld

Copy link
Copy Markdown
Collaborator Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

@mssonicbld
mssonicbld force-pushed the sonicbld/kubesonic-merge branch from c0b461f to 64c4b3a Compare September 18, 2026 03:03
@mssonicbld

Copy link
Copy Markdown
Collaborator Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

@mssonicbld
mssonicbld merged commit da140b4 into Azure:kubesonic Sep 18, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants