[Bug] JDBC Connection Leak in Paimon when Flink job restarts
- Dominant language
- Java
- Stars
- 3.4k
- Forks
- 1.4k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 396
Description
### Search before asking
- [x] I searched in the [issues](https://github.com/apache/paimon/issues) and found nothing similar.
### Paimon version
1.4.2
### Compute Engine
Flink
### Minimal reproduce step
1. Set up a Flink streaming job that writes to a Paimon table backed by a JDBC catalog & locking enabled
2. Start the job that gets into a restarting state on Paimon writes
3. Check MySQL for open connections:
### What doesn't meet your expectations?
When a Flink job shuts down (graceful or restart), all JDBC connections created by that operator instance should be closed. The Jdbc connection count should return to what it was before the job started.
### Anything else?
_No response_
### Are you willing to submit a PR?
- [x] I'm willing to submit a PR!
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the JDBC catalog and locking lifecycle used by the Flink operator, then reproduce the restart scenario from the issue while monitoring MySQL open connections. Done means connections created by the operator are closed after both graceful shutdown and restart, returning the count to its pre-job level.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, mysql
- Domain
- databases, distributed-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100