Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rawkv BatchGet memory leak? #1578

Open
Linzai99 opened this issue Feb 17, 2025 · 1 comment
Open

rawkv BatchGet memory leak? #1578

Linzai99 opened this issue Feb 17, 2025 · 1 comment

Comments

@Linzai99
Copy link

Linzai99 commented Feb 17, 2025

  1. client-go version:
    commit_id is 384feb1
  2. pprof heap

heap_pprof.zip

@you06
Copy link
Contributor

you06 commented Feb 18, 2025

I suspect the memory leak is on the recursive stack.

client-go/rawkv/rawkv.go

Lines 804 to 814 in 279dcd5

if regionErr != nil {
err := bo.Backoff(retry.BoRegionMiss, errors.New(regionErr.String()))
if err != nil {
batchResp.Error = err
return batchResp
}
resp, err = c.sendBatchReq(bo, batch.Keys, options, cmdType)
batchResp.Response = resp
batchResp.Error = err
return batchResp
}

You can add some debug log here to see if the same region error happens continuously (and from the log, you may find the root cause of this error). Or just tells us how to reproduce this leak.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants