Skip to content

Add maxConnections to JdbcConnectionOptions - #6022

Open
Manishram-ai wants to merge 1 commit into
spotify:mainfrom
Manishram-ai:jdbc-max-connections
Open

Manishram-ai wants to merge 1 commit into
spotify:mainfrom
Manishram-ai:jdbc-max-connections

Conversation

@Manishram-ai

Copy link
Copy Markdown

Closes #4047

The JDBC reads and writes use a connection pool that only allows 8 connections per worker by default. If more threads than that try to write at the same time, the rest just wait for a free connection forever, which is why the pipeline in the issue got stuck.

Beam added a setting for this in 2.45 (apache/beam#21200), so this PR exposes it as an optional maxConnections field on JdbcConnectionOptions. It's None by default, so nothing changes for existing users.

I also added a test and a short note in the JDBC docs. Tests pass on Scala 2.13 and 2.12.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

JDBC IO: pipeline gets stuck on attempt to write to Postgres

1 participant