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
chore: upgrade h2 database #5917
Conversation
That seems to be a good ide 👍 |
5d747bf
to
5ff40a2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work! Let's merge this after the next release!
private def upgradeIfNeeded(url: String): Unit = { | ||
val oldVersion = 214 | ||
val formatVersionChangedMessage = | ||
"The write format 2 is smaller than the supported format 3" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any chance we can match on an exact error?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could not check the exact message and just the error code. Trouble is that we wouldn't know the versions are2
and 3
, so if it changes again in the future, it might be 3
and 4
. Maybe it doesn't matter so much since it will fail if the versions change again anyway. Otherwise (looking at the source code), the versions in the error are only in the message I'm afraid.
registerNiceToHaveFilePatterns() | ||
tables.connect() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this line deleted?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
loadFingerPrints()
has to do tables.connect()
anyway. It's just a duplication really.
resolves: #5447
Do we want to fallback to deleting the db if this mechanism fails?