-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Destination Snowflake: Use safe executeMetadataQuery call #37857
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
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.
ffs
doublechecking: resultSet.getMetadata() is safe? b/c presumably we're already inside a database.query() block (we have a few rs.getmetadata calls in various places) |
Yeah, as long as the rs is in try-with or |
LOGGER.info("Retrieving table from Db metadata: {} {}", | ||
id.getRawNamespace(), | ||
id.getRawName()); |
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.
👍 for logging (for now)
What
database.getMetadata()
recycles the underlying connection object back into the pool (in hikari land) after the method call returns. DbMetadata holds an instance copy of that connection object and any subsequent calls which yield aResultSet
could potentially deadlock other calls using the same connection. This was already fixed inJdbcDestinationHandler
but this call was missed out.Can this PR be safely reverted and rolled back?