you06
you06
I suspect the memory leak is on the recursive stack. https://github.com/tikv/client-go/blob/279dcd5b29a2df8797237bb09e41924d52a73fe0/rawkv/rawkv.go#L804-L814 You can add some debug log here to see if the same region error happens continuously (and from the...
snapshot: set `ReplicaRead` to false when `ReplicaReadType` fallbacks to `ReplicaReadLeader` (#1663)
@glorv @zyguan I pushed an empty commit to trigger CI and the LGTM tag is removed, so I need your approve again, thanks.
@plar PTAL. If you think the bitmap traversal is too tricky, I can remove it and only fix the bug in this PR.
Hi @plar, I edit this PR and now it only fixes the bug. The regression test case from you is added to [tree_traversal_test.go](https://github.com/plar/go-adaptive-radix-tree/blob/master/tree_traversal_test.go).
> Is there a test case in tidb to verify the fix? There is a test case in the issue.
> I understand it fixes the data race. I'm just wondering whether it means we are using it correctly. What is the expected behavior when `dirty` is accessed concurrently? >...
@Defined2014 I suggest to attach the addtional info like this: https://github.com/tikv/client-go/compare/master...you06:client-go:add-log?expand=1
> ok. I found that we already have debug log in for this part, maybe we could try open debug log firstly. Debug mode print too many logs...
You can ignore the leak goroutine to fix the test. https://github.com/tikv/client-go/blob/469a7adf7ae88ce8ac69f49473f0b82324030f0b/integration_tests/main_test.go#L27-L31 ```diff opts := []goleak.Option{ goleak.IgnoreTopFunction("github.com/pingcap/goleveldb/leveldb.(*DB).mpoolDrain"), goleak.IgnoreTopFunction("github.com/tikv/client-go/v2/txnkv/transaction.keepAlive"), // TODO: fix ttlManager goroutine leak goleak.IgnoreTopFunction("github.com/tikv/client-go/v2/config/retry.(*Config).createBackoffFn.newBackoffFn.func2"), + goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start"), } ```
All the ART works are finished by other PRs.