[Fix][Connector-V2] Clean up stale SFTP pooled sessions - #11180
Merged
davidzollo merged 5 commits intoJun 30, 2026
Conversation
davidzollo
marked this pull request as draft
June 24, 2026 15:19
davidzollo
marked this pull request as ready for review
June 27, 2026 17:23
DanielLeens
force-pushed
the
dev-sftp-cleanup-pool-fix-20260624
branch
from
June 29, 2026 06:28
280be98 to
b0d730e
Compare
davidzollo
force-pushed
the
dev-sftp-cleanup-pool-fix-20260624
branch
from
June 29, 2026 14:19
093e3ba to
bd667ce
Compare
junjunclub
pushed a commit
to junjunclub/seatunnel
that referenced
this pull request
Jul 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Fixes a shared SFTP cleanup failure that showed up in unrelated PR CI runs.
The fix keeps pooled sibling channels tracked correctly, closes stale SSH sessions when a dead channel is replaced, and initializes the pool with the real live-connection count so reusable sessions are not treated as over-limit immediately.
Why is this needed?
Recent CI failures in
SftpFileIT#testSftpBinaryUpdateModeContinuousDiscoveryDistcpwere not caused by the feature PRs under test. The failing job reportedWait continuous job exit failedandThere are still threads running in the container, which matches leaked or stale SFTP session cleanup.How was this validated?
./mvnw -pl seatunnel-connectors-v2/connector-file/connector-file-sftp spotless:apply -DskipTests./mvnw -pl seatunnel-connectors-v2/connector-file/connector-file-sftp -Dtest=SFTPConnectionPoolTest,SftpFileSystemTest -DfailIfNoTests=false test./mvnw -pl seatunnel-e2e/seatunnel-connector-v2-e2e/connector-file-sftp-e2e -Dskip.ui=true -Dtest=SftpFileIT#testSftpBinaryUpdateModeContinuousDiscoveryDistcp -DfailIfNoTests=false testseatunnel-engine-uiwas skipped because this fix only touches the SFTP connector module and the SFTP E2E module. The E2E attempt was blocked locally by an unresponsive Docker socket (/_pingtimed out on~/.docker/run/docker.sock), so the closest completed validation is the connector module unit test coverage above.