Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@katzyn
Copy link
Contributor

@katzyn katzyn commented Jul 22, 2023

DB_CLOSE_ON_EXIT is one of the most popular misused dangerous settings.

  1. Default value of this setting is now FALSE for in-memory databases to avoid registration of shutdown hook. I'm not sure about that, but I think we don't really need to explicitly close any in-memory databases on VM shutdown. Anyway, it is possible to restore this feature with DB_CLOSE_ON_EXIT=TRUE.
  2. For persistent databases the default value is still TRUE as it should, but if it was set to FALSE explicitly, the shutdown hook is registered anyway and VM shutdown event executes a CHECKPOINT command to flush data on disk for more safety.
  3. Documentation of this setting now has all necessary warnings and explains how to use it properly.

@grandinj

@sonatype-lift
Copy link
Contributor

sonatype-lift bot commented Jul 22, 2023

Sonatype Lift is retiring

Sonatype Lift will be retiring on Sep 12, 2023, with its analysis stopping on Aug 12, 2023. We understand that this news may come as a disappointment, and Sonatype is committed to helping you transition off it seamlessly. If you’d like to retain your data, please export your issues from the web console.
We are extremely grateful and thank you for your support over the years.

📖 Read about the impacts and timeline

@grandinj
Copy link
Contributor

LGTM

@katzyn katzyn merged commit b251b85 into h2database:master Jul 22, 2023
@katzyn katzyn deleted the db_close_on_exit branch July 22, 2023 15:24
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.

2 participants