Skip to content

Commit 99e1ba7

Browse files
nfudenyuval-k
andauthored
[1.18] log leak backport (#10545)
Co-authored-by: Yuval Kohavi <[email protected]>
1 parent 2f59d4d commit 99e1ba7

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

changelog/v1.18.3/memleak.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
changelog:
2+
- type: FIX
3+
issueLink: https://github.com/solo-io/solo-projects/issues/7573
4+
description: >-
5+
Fix a memory leaking a log name.

projects/gloo/pkg/syncer/setup/setup_syncer.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -1375,15 +1375,15 @@ func runQueue(ctx context.Context, proxyReconcileQueue ggv2utils.AsyncQueue[gloo
13751375
// the proxy type key/value must stay in sync with the one defined in projects/gateway2/translator/gateway_translator.go
13761376
utils.ProxyTypeKey: utils.GatewayApiProxyValue,
13771377
}
1378+
ctx = contextutils.WithLogger(ctx, "proxyCache")
1379+
logger := contextutils.LoggerFrom(ctx)
1380+
13781381
proxyReconciler := gloov1.NewProxyReconciler(proxyClient, statusutils.NewNoOpStatusClient())
13791382
for {
13801383
proxyList, err := proxyReconcileQueue.Dequeue(ctx)
13811384
if err != nil {
13821385
return
13831386
}
1384-
ctx = contextutils.WithLogger(ctx, "proxyCache")
1385-
logger := contextutils.LoggerFrom(ctx)
1386-
13871387
// Proxy CR is located in the writeNamespace, which may be different from the originating Gateway CR
13881388
err = proxyReconciler.Reconcile(
13891389
writeNamespace,

0 commit comments

Comments
 (0)