pingcap / pingcap/tidb-operator
Fix possible leak when removing finalizers
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 1.3k
- Forks
- 540
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 18
Description
Now finalizer is removed if all listed resources are not found. However, all read op is reading cache. It means some resources may not be "seen" when deleting.
Not only kubernetes resources but also data in PD may have this issue. For example, store is leak.
- Pod is created and the store is created.
- Instance is marked as offline.
- Store is still not be "seen". The instance is deleting.
- All resources are deleted.
We have to ensure all resources(k8s, PD data) are deleted. Do not depends on the cache data.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing how finalizers are removed and how the cache-backed read operations determine whether Kubernetes resources and PD data are present. Reproduce the offline-instance deletion sequence described in the issue, then verify that finalizer removal waits until all resources are confirmed deleted without relying on cache data.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, kubernetes
- Domain
- infrastructure
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100