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

Fir 37710 jdbc validate connection against system engine #473

Conversation

stepansergeevitch
Copy link
Contributor

Improvements for isValid method:

  • FIR-37621 run validation for a system engine as well
  • add a connection property validate_on_system_engine, which forces a connection to run isValid on a system engine even if it's connected to a user engine

@stepansergeevitch stepansergeevitch self-assigned this Oct 29, 2024
@stepansergeevitch stepansergeevitch requested a review from a team as a code owner October 29, 2024 11:04
Copy link
Contributor

@ptiurin ptiurin left a comment

Choose a reason for hiding this comment

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

Couple of small points, otherwise looks good.

}
var propertiesBuilder = fireboltProperties.toBuilder().runtimeAdditionalProperties(runtimeProperties);
if (getSessionProperties().isValidateOnSystemEngine()) {
propertiesBuilder.compress(false).engine(null).systemEngine(true);
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do we have compress(false) defined here? Is there a special behaviour on system engine?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

For system engine we automatically disable compress in JDBC.
https://github.com/firebolt-db/jdbc/blob/master/src/main/java/com/firebolt/jdbc/connection/settings/FireboltProperties.java#L97
I'm not sure of the reasons, all that I can say is that system engine doesn't work with compres as tests have shown. We receive an expected end of stream, and I failed ot understand the reason behind it

@stepansergeevitch stepansergeevitch merged commit 8f8a82d into master Oct 30, 2024
3 checks passed
@stepansergeevitch stepansergeevitch deleted the FIR-37710-jdbc-validate-connection-against-system-engine branch October 30, 2024 11:15
Copy link

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