Skip to content

Conversation

g31pranjal
Copy link
Member

@g31pranjal g31pranjal commented Sep 30, 2025

This PR does a couple of things:

  • removes the usage of CONTINUATION_CONTAINS_COMPILED_STATEMENT option in Connection and as a query option.
  • The option was, by default, set to true and is now true for all the requests to the engine.
  • We still support SELECT ... WITH CONTINUATION ..., which could be removed separately after this work. Hence, it could happen that a query started with a non-serialized continuation, but has now on serialised continuation.
  • JDBC driver still supports the option, for backward compatilibility. However, the current change always sets that to TRUE and rejects connections that have it set to FALSE. Once this is rolled out, we should probably stop failing on false and mark the option as deprecated in proto. Finally, we can stop setting the option and remove the option altogether.
  • Removes a few tests around testing this option with False.

@g31pranjal g31pranjal added the cleanup Non-breaking/stylistic code cleanup label Sep 30, 2025
@g31pranjal g31pranjal force-pushed the remove_complied_statement_option branch from b0b2ada to 23d49b7 Compare September 30, 2025 14:00
Copy link
Collaborator

@alecgrieser alecgrieser left a comment

Choose a reason for hiding this comment

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

LGTM. I have a PR to bump the version to 4.7: #3653. It might be good to bundle that in with the other 4.7 changes as a kind of API change that we're delivering here

static com.apple.foundationdb.relational.jdbc.grpc.v1.Options.Builder toProtobuf(@Nonnull Options options) throws SQLException {
final var builder = com.apple.foundationdb.relational.jdbc.grpc.v1.Options.newBuilder();
// Switched-on by default on JDBC driver until the option is deprecated and removed.
builder.setContinuationsContainCompiledStatements(true);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is the idea here that we need to set this in case the Options from a modern version are shipped to a older server that expects the field to be set?

Copy link
Member Author

Choose a reason for hiding this comment

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

The idea, from this version, is that the option cannot be explicitly set to False. Setting it to TRUE here is indicative of what we are getting into starting now. Also, the check here is to ensure that we never set it to False going ahead, or to maintain backward compatibility. After this is rolled out, we need a PR to remove usage of this option in JDBC and mark it deprecated. Then, we remove the field itself!

@g31pranjal g31pranjal merged commit 7119e7e into FoundationDB:main Oct 1, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cleanup Non-breaking/stylistic code cleanup
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants