Skip to content

[Fix][Connector-V2] Clean up stale SFTP pooled sessions - #11180

Merged
davidzollo merged 5 commits into
apache:devfrom
DanielLeens:dev-sftp-cleanup-pool-fix-20260624
Jun 30, 2026
Merged

[Fix][Connector-V2] Clean up stale SFTP pooled sessions#11180
davidzollo merged 5 commits into
apache:devfrom
DanielLeens:dev-sftp-cleanup-pool-fix-20260624

Conversation

@DanielLeens

Copy link
Copy Markdown
Contributor

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#testSftpBinaryUpdateModeContinuousDiscoveryDistcp were not caused by the feature PRs under test. The failing job reported Wait continuous job exit failed and There 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
  • attempted closer E2E validation with:
    • ./mvnw -pl seatunnel-e2e/seatunnel-connector-v2-e2e/connector-file-sftp-e2e -Dskip.ui=true -Dtest=SftpFileIT#testSftpBinaryUpdateModeContinuousDiscoveryDistcp -DfailIfNoTests=false test

seatunnel-engine-ui was 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 (/_ping timed out on ~/.docker/run/docker.sock), so the closest completed validation is the connector module unit test coverage above.

@davidzollo
davidzollo marked this pull request as draft June 24, 2026 15:19
@github-actions github-actions Bot added the Zeta label Jun 27, 2026
@davidzollo
davidzollo marked this pull request as ready for review June 27, 2026 17:23
@DanielLeens
DanielLeens force-pushed the dev-sftp-cleanup-pool-fix-20260624 branch from 280be98 to b0d730e Compare June 29, 2026 06:28
@github-actions github-actions Bot removed the Zeta label Jun 29, 2026
@davidzollo
davidzollo force-pushed the dev-sftp-cleanup-pool-fix-20260624 branch from 093e3ba to bd667ce Compare June 29, 2026 14:19

@davidzollo davidzollo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1
LGTM

@davidzollo
davidzollo merged commit b253248 into apache:dev Jun 30, 2026
3 checks passed
junjunclub pushed a commit to junjunclub/seatunnel that referenced this pull request Jul 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants