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

Set DB_CLOSE_DELAY for Raptor H2 #12777

Merged
merged 1 commit into from
Jun 10, 2022
Merged

Conversation

electrum
Copy link
Member

@electrum electrum commented Jun 9, 2022

Test fix. Restores previous dbpool behavior.

Related issues, pull requests, and links

Fixes #12726

Documentation

(x) No documentation is needed.

Release notes

(x) No release notes entries required.

@cla-bot cla-bot bot added the cla-signed label Jun 9, 2022
Copy link
Member

@ebyhr ebyhr left a comment

Choose a reason for hiding this comment

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

Approving as stress test result in #12770 looks fine.

@@ -85,7 +86,7 @@ public void configure(Binder binder)
@ForMetadata
public static ConnectionFactory createConnectionFactory(H2DatabaseConfig config)
{
String url = "jdbc:h2:" + config.getFilename();
String url = format("jdbc:h2:%s;DB_CLOSE_DELAY=-1", config.getFilename());
Copy link
Member

Choose a reason for hiding this comment

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

Worth documenting why DB_CLOSE_DELAY matters?

Copy link
Member

Choose a reason for hiding this comment

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

per h2 docs, DB_CLOSE_DELAY=-1 will keep database around for longer (which is probably desireable in the tests)
i expect this will address some H2 related failures that i observed in my stress test #12730
will this also prevent OOM? why?
intuitively DB_CLOSE_DELAY=-1 increases memory usage, not decreases.

Copy link
Member Author

Choose a reason for hiding this comment

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

I have no idea. It's been there forever.

@electrum electrum merged commit 041b8dd into trinodb:master Jun 10, 2022
@electrum electrum deleted the fix-raptor branch June 10, 2022 18:42
@github-actions github-actions bot added this to the 386 milestone Jun 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

trino-raptor-legacy tests are flaky, e.g. sometimes fail with OutOfMemoryError
3 participants