Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FLINK-22462][jdbc] Fix connection leak and stabilize JdbcExactlyOnceSinkE2eTest #15823

Merged
merged 2 commits into from
Jun 22, 2021

Conversation

rkhachatryan
Copy link
Contributor

@rkhachatryan rkhachatryan commented May 3, 2021

  1. Close pooled and physical connections in XaFacadeImpl (tolerate close errors for MySQL)
  2. Harden test by adding MySql
  3. Prevent sources from waiting on cancellation
  4. Prevent sources from using a latch from a different attempt

@flinkbot
Copy link
Collaborator

flinkbot commented May 3, 2021

Thanks a lot for your contribution to the Apache Flink project. I'm the @flinkbot. I help the community
to review your pull request. We will use this comment to track the progress of the review.

Automated Checks

Last check on commit a1fb269 (Thu Sep 23 17:26:33 UTC 2021)

Warnings:

  • 1 pom.xml files were touched: Check for build and licensing issues.
  • No documentation files were touched! Remember to keep the Flink docs up to date!

Mention the bot in a comment to re-run the automated checks.

Review Progress

  • ❓ 1. The [description] looks good.
  • ❓ 2. There is [consensus] that the contribution should go into to Flink.
  • ❓ 3. Needs [attention] from.
  • ❓ 4. The change fits into the overall [architecture].
  • ❓ 5. Overall code [quality] is good.

Please see the Pull Request Review Guide for a full explanation of the review process.


The Bot is tracking the review progress through labels. Labels are applied according to the order of the review items. For consensus, approval by a Flink committer of PMC member is required Bot commands
The @flinkbot bot supports the following commands:

  • @flinkbot approve description to approve one or more aspects (aspects: description, consensus, architecture and quality)
  • @flinkbot approve all to approve all aspects
  • @flinkbot approve-until architecture to approve everything until architecture
  • @flinkbot attention @username1 [@username2 ..] to require somebody's attention
  • @flinkbot disapprove architecture to remove an approval you gave earlier

@flinkbot
Copy link
Collaborator

flinkbot commented May 3, 2021

CI report:

Bot commands The @flinkbot bot supports the following commands:
  • @flinkbot run travis re-run the last Travis build
  • @flinkbot run azure re-run the last Azure build

@rkhachatryan rkhachatryan force-pushed the f22462 branch 2 times, most recently from df97ad0 to 323d87e Compare May 3, 2021 19:16
@rkhachatryan rkhachatryan changed the title [FLINK-22462][tests] Set max_connections to 200 in pgsql [FLINK-22462][tests] Stabilize JdbcExactlyOnceSinkE2eTest May 4, 2021
@rkhachatryan rkhachatryan marked this pull request as ready for review May 4, 2021 07:56
@curcur
Copy link
Contributor

curcur commented May 7, 2021

Let's sync up offline?

  1. what causes the job to have more than 200 connections, with parallelism = 4?
  2. If we have too many connections for the preparing state(uncommitted), can we slow down the source pace?
  3. Should we set up an upper limit for connection pool size?
  4. Why "Prevent sources from waiting on cancellation" would help to reduce the connection in this case?

@rkhachatryan rkhachatryan changed the title [FLINK-22462][tests] Stabilize JdbcExactlyOnceSinkE2eTest [FLINK-22462][jdbc] Fix connection leak and stabilize JdbcExactlyOnceSinkE2eTest May 26, 2021
@rkhachatryan
Copy link
Contributor Author

Thanks for reviewing the PR @curcur.
I've addressed your concerns and also updated production code (so there is no connection issue now); and added MySQL setup, PTAL.

Copy link
Contributor

@AHeise AHeise left a comment

Choose a reason for hiding this comment

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

Thank you very much the fix and the extended test. A quick question: shouldn't we reorder the commits such that the fix appears before the test?

1. Add test against MySQL
2. Fix multiple issues in the test
- Indefinite waiting in sources
- Too early emission causing starvation in maps
@rkhachatryan
Copy link
Contributor Author

I agree, reordered the commits and rebased them onto the latest master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants