Skip to content

Commit 9776f36

Browse files
authored
Deprecate compiled statement continuations in jdbc (#3659)
The CONTINUATION_CONTAINS_COMPILED_STATEMENT usage was cut down to always being true in #3650. It was enforced to always be so in release `4.7.1.0` for JDBC connections which would fail queries explicitly marking it as false. Now, this PR removes the check and marks the proto field as deprecated.
1 parent eb68481 commit 9776f36

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

fdb-relational-grpc/src/main/java/com/apple/foundationdb/relational/jdbc/TypeConversion.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -574,8 +574,6 @@ public static Continuation.Reason toReason(RpcContinuationReason reason) {
574574
@SuppressWarnings("unchecked")
575575
static com.apple.foundationdb.relational.jdbc.grpc.v1.Options.Builder toProtobuf(@Nonnull Options options) throws SQLException {
576576
final var builder = com.apple.foundationdb.relational.jdbc.grpc.v1.Options.newBuilder();
577-
// Switched-on by default on JDBC driver until the option is deprecated and removed.
578-
builder.setContinuationsContainCompiledStatements(true);
579577
for (Map.Entry<Options.Name, ?> entry : options.entries()) {
580578
switch (entry.getKey()) {
581579
case MAX_ROWS:
@@ -795,9 +793,6 @@ public static Options fromProtobuf(com.apple.foundationdb.relational.jdbc.grpc.v
795793
if (protoOptions.hasValidPlanHashModes()) {
796794
builder.withOption(Options.Name.VALID_PLAN_HASH_MODES, protoOptions.getValidPlanHashModes());
797795
}
798-
if (protoOptions.hasContinuationsContainCompiledStatements() && !protoOptions.getContinuationsContainCompiledStatements()) {
799-
throw new RelationalException("Option CONTINUATIONS_CONTAIN_COMPILED_STATEMENTS=false not supported anymore!", ErrorCode.UNSUPPORTED_OPERATION).toUncheckedWrappedException();
800-
}
801796
if (protoOptions.hasAsyncOperationsTimeoutMillis()) {
802797
builder.withOption(Options.Name.ASYNC_OPERATIONS_TIMEOUT_MILLIS, protoOptions.getAsyncOperationsTimeoutMillis());
803798
}

fdb-relational-grpc/src/main/proto/grpc/relational/jdbc/v1/jdbc.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ message Options {
145145
optional bool case_sensitive_identifiers = 22;
146146
optional string current_plan_hash_mode = 23;
147147
optional string valid_plan_hash_modes = 24;
148-
optional bool continuations_contain_compiled_statements = 25;
148+
optional bool continuations_contain_compiled_statements = 25 [deprecated = true];
149149
optional int64 async_operations_timeout_millis = 26;
150150
optional bool encrypt_when_serializing = 27;
151151
optional string encryption_key_store = 28;

0 commit comments

Comments
 (0)