Moves an instance to the target instance configuration. You can use the returned long-running operation to track the progress of moving the instance.
* `MoveInstance` returns `FAILED_PRECONDITION` if the instance meets any of the following criteria:
* * Is undergoing a move to a different instance configuration * Has backups * Has an ongoing update * Contains any CMEK-enabled databases * Is a free trial instance
* While the operation is pending:
* * All other attempts to modify the instance, including changes to its compute capacity, are rejected. * The following database and backup admin operations are rejected:
* * `DatabaseAdmin.CreateDatabase` * `DatabaseAdmin.UpdateDatabaseDdl` (disabled if default_leader is specified in the request.) * `DatabaseAdmin.RestoreDatabase` * `DatabaseAdmin.CreateBackup` * `DatabaseAdmin.CopyBackup`
* * Both the source and target instance configurations are subject to hourly compute and storage charges. * The instance might experience higher read-write latencies and a higher transaction abort rate. However, moving an instance doesn't cause any downtime.
- * The returned [long-running operation][google.longrunning.Operation] has a name of the format `<instance_name>/operations/<operation_id>` and can be used to track the move instance operation. The [metadata][google.longrunning.Operation.metadata] field type is [MoveInstanceMetadata][google.spanner.admin.instance.v1.MoveInstanceMetadata]. The [response][google.longrunning.Operation.response] field type is [Instance][google.spanner.admin.instance.v1.Instance], if successful. Cancelling the operation sets its metadata's [cancel_time][google.spanner.admin.instance.v1.MoveInstanceMetadata.cancel_time]. Cancellation is not immediate because it involves moving any data previously moved to the target instance configuration back to the original instance configuration. You can use this operation to track the progress of the cancellation. Upon successful completion of the cancellation, the operation terminates with `CANCELLED` status.
+ * The returned long-running operation has a name of the format `<instance_name>/operations/<operation_id>` and can be used to track the move instance operation. The metadata field type is [MoveInstanceMetadata][google.spanner.admin.instance.v1.MoveInstanceMetadata]. The response field type is [Instance][google.spanner.admin.instance.v1.Instance], if successful. Cancelling the operation sets its metadata's [cancel_time][google.spanner.admin.instance.v1.MoveInstanceMetadata.cancel_time]. Cancellation is not immediate because it involves moving any data previously moved to the target instance configuration back to the original instance configuration. You can use this operation to track the progress of the cancellation. Upon successful completion of the cancellation, the operation terminates with `CANCELLED` status.
* If not cancelled, upon completion of the returned operation:
* * The instance successfully moves to the target instance configuration. * You are billed for compute and storage in target instance configuration.
* Authorization requires the `spanner.instances.update` permission on the resource [instance][google.spanner.admin.instance.v1.Instance].
@@ -734,6 +735,8 @@ public final OperationsClient getHttpJsonOperationsClient() {
/**
* Lists the supported instance configurations for a given project.
*
+ * Returns both Google-managed configurations and user-managed configurations.
+ *
* Sample code:
*
* {@code
@@ -766,6 +769,8 @@ public final ListInstanceConfigsPagedResponse listInstanceConfigs(ProjectName pa
/**
* Lists the supported instance configurations for a given project.
*
+ * Returns both Google-managed configurations and user-managed configurations.
+ *
* Sample code:
*
* {@code
@@ -796,6 +801,8 @@ public final ListInstanceConfigsPagedResponse listInstanceConfigs(String parent)
/**
* Lists the supported instance configurations for a given project.
*
+ * Returns both Google-managed configurations and user-managed configurations.
+ *
* Sample code:
*
* {@code
@@ -829,6 +836,8 @@ public final ListInstanceConfigsPagedResponse listInstanceConfigs(
/**
* Lists the supported instance configurations for a given project.
*
+ * Returns both Google-managed configurations and user-managed configurations.
+ *
* Sample code:
*
* {@code
@@ -862,6 +871,8 @@ public final ListInstanceConfigsPagedResponse listInstanceConfigs(
/**
* Lists the supported instance configurations for a given project.
*
+ * Returns both Google-managed configurations and user-managed configurations.
+ *
* Sample code:
*
* {@code
@@ -1013,11 +1024,10 @@ public final UnaryCallable getInstance
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Creates an instance configuration and begins preparing it to be used. The returned
- * [long-running operation][google.longrunning.Operation] can be used to track the progress of
- * preparing the new instance configuration. The instance configuration name is assigned by the
- * caller. If the named instance configuration already exists, `CreateInstanceConfig` returns
- * `ALREADY_EXISTS`.
+ * Creates an instance configuration and begins preparing it to be used. The returned long-running
+ * operation can be used to track the progress of preparing the new instance configuration. The
+ * instance configuration name is assigned by the caller. If the named instance configuration
+ * already exists, `CreateInstanceConfig` returns `ALREADY_EXISTS`.
*
* Immediately after the request returns:
*
@@ -1038,13 +1048,12 @@ public final UnaryCallable getInstance
* configuration's [reconciling][google.spanner.admin.instance.v1.InstanceConfig.reconciling]
* field becomes false. Its state becomes `READY`.
*
- * The returned [long-running operation][google.longrunning.Operation] will have a name of the
- * format `<instance_config_name>/operations/<operation_id>` and can be used to track
- * creation of the instance configuration. The [metadata][google.longrunning.Operation.metadata]
- * field type is
+ * The returned long-running operation will have a name of the format
+ * `<instance_config_name>/operations/<operation_id>` and can be used to track
+ * creation of the instance configuration. The metadata field type is
* [CreateInstanceConfigMetadata][google.spanner.admin.instance.v1.CreateInstanceConfigMetadata].
- * The [response][google.longrunning.Operation.response] field type is
- * [InstanceConfig][google.spanner.admin.instance.v1.InstanceConfig], if successful.
+ * The response field type is [InstanceConfig][google.spanner.admin.instance.v1.InstanceConfig],
+ * if successful.
*
* Authorization requires `spanner.instanceConfigs.create` permission on the resource
* [parent][google.spanner.admin.instance.v1.CreateInstanceConfigRequest.parent].
@@ -1070,9 +1079,9 @@ public final UnaryCallable getInstance
*
* @param parent Required. The name of the project in which to create the instance configuration.
* Values are of the form `projects/<project>`.
- * @param instanceConfig Required. The InstanceConfig proto of the configuration to create.
- * instance_config.name must be `<parent>/instanceConfigs/<instance_config_id>`.
- * instance_config.base_config must be a Google managed configuration name, e.g.
+ * @param instanceConfig Required. The `InstanceConfig` proto of the configuration to create.
+ * `instance_config.name` must be `<parent>/instanceConfigs/<instance_config_id>`.
+ * `instance_config.base_config` must be a Google-managed configuration name, e.g.
* <parent>/instanceConfigs/us-east1, <parent>/instanceConfigs/nam3.
* @param instanceConfigId Required. The ID of the instance configuration to create. Valid
* identifiers are of the form `custom-[-a-z0-9]*[a-z0-9]` and must be between 2 and 64
@@ -1094,11 +1103,10 @@ public final UnaryCallable getInstance
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Creates an instance configuration and begins preparing it to be used. The returned
- * [long-running operation][google.longrunning.Operation] can be used to track the progress of
- * preparing the new instance configuration. The instance configuration name is assigned by the
- * caller. If the named instance configuration already exists, `CreateInstanceConfig` returns
- * `ALREADY_EXISTS`.
+ * Creates an instance configuration and begins preparing it to be used. The returned long-running
+ * operation can be used to track the progress of preparing the new instance configuration. The
+ * instance configuration name is assigned by the caller. If the named instance configuration
+ * already exists, `CreateInstanceConfig` returns `ALREADY_EXISTS`.
*
* Immediately after the request returns:
*
@@ -1119,13 +1127,12 @@ public final UnaryCallable getInstance
* configuration's [reconciling][google.spanner.admin.instance.v1.InstanceConfig.reconciling]
* field becomes false. Its state becomes `READY`.
*
- * The returned [long-running operation][google.longrunning.Operation] will have a name of the
- * format `<instance_config_name>/operations/<operation_id>` and can be used to track
- * creation of the instance configuration. The [metadata][google.longrunning.Operation.metadata]
- * field type is
+ * The returned long-running operation will have a name of the format
+ * `<instance_config_name>/operations/<operation_id>` and can be used to track
+ * creation of the instance configuration. The metadata field type is
* [CreateInstanceConfigMetadata][google.spanner.admin.instance.v1.CreateInstanceConfigMetadata].
- * The [response][google.longrunning.Operation.response] field type is
- * [InstanceConfig][google.spanner.admin.instance.v1.InstanceConfig], if successful.
+ * The response field type is [InstanceConfig][google.spanner.admin.instance.v1.InstanceConfig],
+ * if successful.
*
* Authorization requires `spanner.instanceConfigs.create` permission on the resource
* [parent][google.spanner.admin.instance.v1.CreateInstanceConfigRequest.parent].
@@ -1151,9 +1158,9 @@ public final UnaryCallable getInstance
*
* @param parent Required. The name of the project in which to create the instance configuration.
* Values are of the form `projects/<project>`.
- * @param instanceConfig Required. The InstanceConfig proto of the configuration to create.
- * instance_config.name must be `<parent>/instanceConfigs/<instance_config_id>`.
- * instance_config.base_config must be a Google managed configuration name, e.g.
+ * @param instanceConfig Required. The `InstanceConfig` proto of the configuration to create.
+ * `instance_config.name` must be `<parent>/instanceConfigs/<instance_config_id>`.
+ * `instance_config.base_config` must be a Google-managed configuration name, e.g.
* <parent>/instanceConfigs/us-east1, <parent>/instanceConfigs/nam3.
* @param instanceConfigId Required. The ID of the instance configuration to create. Valid
* identifiers are of the form `custom-[-a-z0-9]*[a-z0-9]` and must be between 2 and 64
@@ -1175,11 +1182,10 @@ public final UnaryCallable getInstance
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Creates an instance configuration and begins preparing it to be used. The returned
- * [long-running operation][google.longrunning.Operation] can be used to track the progress of
- * preparing the new instance configuration. The instance configuration name is assigned by the
- * caller. If the named instance configuration already exists, `CreateInstanceConfig` returns
- * `ALREADY_EXISTS`.
+ * Creates an instance configuration and begins preparing it to be used. The returned long-running
+ * operation can be used to track the progress of preparing the new instance configuration. The
+ * instance configuration name is assigned by the caller. If the named instance configuration
+ * already exists, `CreateInstanceConfig` returns `ALREADY_EXISTS`.
*
* Immediately after the request returns:
*
@@ -1200,13 +1206,12 @@ public final UnaryCallable getInstance
* configuration's [reconciling][google.spanner.admin.instance.v1.InstanceConfig.reconciling]
* field becomes false. Its state becomes `READY`.
*
- * The returned [long-running operation][google.longrunning.Operation] will have a name of the
- * format `<instance_config_name>/operations/<operation_id>` and can be used to track
- * creation of the instance configuration. The [metadata][google.longrunning.Operation.metadata]
- * field type is
+ * The returned long-running operation will have a name of the format
+ * `<instance_config_name>/operations/<operation_id>` and can be used to track
+ * creation of the instance configuration. The metadata field type is
* [CreateInstanceConfigMetadata][google.spanner.admin.instance.v1.CreateInstanceConfigMetadata].
- * The [response][google.longrunning.Operation.response] field type is
- * [InstanceConfig][google.spanner.admin.instance.v1.InstanceConfig], if successful.
+ * The response field type is [InstanceConfig][google.spanner.admin.instance.v1.InstanceConfig],
+ * if successful.
*
* Authorization requires `spanner.instanceConfigs.create` permission on the resource
* [parent][google.spanner.admin.instance.v1.CreateInstanceConfigRequest.parent].
@@ -1241,11 +1246,10 @@ public final UnaryCallable getInstance
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Creates an instance configuration and begins preparing it to be used. The returned
- * [long-running operation][google.longrunning.Operation] can be used to track the progress of
- * preparing the new instance configuration. The instance configuration name is assigned by the
- * caller. If the named instance configuration already exists, `CreateInstanceConfig` returns
- * `ALREADY_EXISTS`.
+ * Creates an instance configuration and begins preparing it to be used. The returned long-running
+ * operation can be used to track the progress of preparing the new instance configuration. The
+ * instance configuration name is assigned by the caller. If the named instance configuration
+ * already exists, `CreateInstanceConfig` returns `ALREADY_EXISTS`.
*
* Immediately after the request returns:
*
@@ -1266,13 +1270,12 @@ public final UnaryCallable getInstance
* configuration's [reconciling][google.spanner.admin.instance.v1.InstanceConfig.reconciling]
* field becomes false. Its state becomes `READY`.
*
- * The returned [long-running operation][google.longrunning.Operation] will have a name of the
- * format `<instance_config_name>/operations/<operation_id>` and can be used to track
- * creation of the instance configuration. The [metadata][google.longrunning.Operation.metadata]
- * field type is
+ * The returned long-running operation will have a name of the format
+ * `<instance_config_name>/operations/<operation_id>` and can be used to track
+ * creation of the instance configuration. The metadata field type is
* [CreateInstanceConfigMetadata][google.spanner.admin.instance.v1.CreateInstanceConfigMetadata].
- * The [response][google.longrunning.Operation.response] field type is
- * [InstanceConfig][google.spanner.admin.instance.v1.InstanceConfig], if successful.
+ * The response field type is [InstanceConfig][google.spanner.admin.instance.v1.InstanceConfig],
+ * if successful.
*
* Authorization requires `spanner.instanceConfigs.create` permission on the resource
* [parent][google.spanner.admin.instance.v1.CreateInstanceConfigRequest.parent].
@@ -1308,11 +1311,10 @@ public final UnaryCallable getInstance
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Creates an instance configuration and begins preparing it to be used. The returned
- * [long-running operation][google.longrunning.Operation] can be used to track the progress of
- * preparing the new instance configuration. The instance configuration name is assigned by the
- * caller. If the named instance configuration already exists, `CreateInstanceConfig` returns
- * `ALREADY_EXISTS`.
+ * Creates an instance configuration and begins preparing it to be used. The returned long-running
+ * operation can be used to track the progress of preparing the new instance configuration. The
+ * instance configuration name is assigned by the caller. If the named instance configuration
+ * already exists, `CreateInstanceConfig` returns `ALREADY_EXISTS`.
*
* Immediately after the request returns:
*
@@ -1333,13 +1335,12 @@ public final UnaryCallable getInstance
* configuration's [reconciling][google.spanner.admin.instance.v1.InstanceConfig.reconciling]
* field becomes false. Its state becomes `READY`.
*
- * The returned [long-running operation][google.longrunning.Operation] will have a name of the
- * format `<instance_config_name>/operations/<operation_id>` and can be used to track
- * creation of the instance configuration. The [metadata][google.longrunning.Operation.metadata]
- * field type is
+ * The returned long-running operation will have a name of the format
+ * `<instance_config_name>/operations/<operation_id>` and can be used to track
+ * creation of the instance configuration. The metadata field type is
* [CreateInstanceConfigMetadata][google.spanner.admin.instance.v1.CreateInstanceConfigMetadata].
- * The [response][google.longrunning.Operation.response] field type is
- * [InstanceConfig][google.spanner.admin.instance.v1.InstanceConfig], if successful.
+ * The response field type is [InstanceConfig][google.spanner.admin.instance.v1.InstanceConfig],
+ * if successful.
*
* Authorization requires `spanner.instanceConfigs.create` permission on the resource
* [parent][google.spanner.admin.instance.v1.CreateInstanceConfigRequest.parent].
@@ -1374,9 +1375,9 @@ public final UnaryCallable getInstance
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Updates an instance configuration. The returned [long-running
- * operation][google.longrunning.Operation] can be used to track the progress of updating the
- * instance. If the named instance configuration does not exist, returns `NOT_FOUND`.
+ * Updates an instance configuration. The returned long-running operation can be used to track the
+ * progress of updating the instance. If the named instance configuration does not exist, returns
+ * `NOT_FOUND`.
*
* Only user-managed configurations can be updated.
*
@@ -1402,13 +1403,12 @@ public final UnaryCallable getInstance
* configuration's [reconciling][google.spanner.admin.instance.v1.InstanceConfig.reconciling]
* field becomes false.
*
- * The returned [long-running operation][google.longrunning.Operation] will have a name of the
- * format `<instance_config_name>/operations/<operation_id>` and can be used to track
- * the instance configuration modification. The [metadata][google.longrunning.Operation.metadata]
- * field type is
+ * The returned long-running operation will have a name of the format
+ * `<instance_config_name>/operations/<operation_id>` and can be used to track the
+ * instance configuration modification. The metadata field type is
* [UpdateInstanceConfigMetadata][google.spanner.admin.instance.v1.UpdateInstanceConfigMetadata].
- * The [response][google.longrunning.Operation.response] field type is
- * [InstanceConfig][google.spanner.admin.instance.v1.InstanceConfig], if successful.
+ * The response field type is [InstanceConfig][google.spanner.admin.instance.v1.InstanceConfig],
+ * if successful.
*
* Authorization requires `spanner.instanceConfigs.update` permission on the resource
* [name][google.spanner.admin.instance.v1.InstanceConfig.name].
@@ -1454,9 +1454,9 @@ public final UnaryCallable getInstance
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Updates an instance configuration. The returned [long-running
- * operation][google.longrunning.Operation] can be used to track the progress of updating the
- * instance. If the named instance configuration does not exist, returns `NOT_FOUND`.
+ * Updates an instance configuration. The returned long-running operation can be used to track the
+ * progress of updating the instance. If the named instance configuration does not exist, returns
+ * `NOT_FOUND`.
*
* Only user-managed configurations can be updated.
*
@@ -1482,13 +1482,12 @@ public final UnaryCallable getInstance
* configuration's [reconciling][google.spanner.admin.instance.v1.InstanceConfig.reconciling]
* field becomes false.
*
- * The returned [long-running operation][google.longrunning.Operation] will have a name of the
- * format `<instance_config_name>/operations/<operation_id>` and can be used to track
- * the instance configuration modification. The [metadata][google.longrunning.Operation.metadata]
- * field type is
+ * The returned long-running operation will have a name of the format
+ * `<instance_config_name>/operations/<operation_id>` and can be used to track the
+ * instance configuration modification. The metadata field type is
* [UpdateInstanceConfigMetadata][google.spanner.admin.instance.v1.UpdateInstanceConfigMetadata].
- * The [response][google.longrunning.Operation.response] field type is
- * [InstanceConfig][google.spanner.admin.instance.v1.InstanceConfig], if successful.
+ * The response field type is [InstanceConfig][google.spanner.admin.instance.v1.InstanceConfig],
+ * if successful.
*
* Authorization requires `spanner.instanceConfigs.update` permission on the resource
* [name][google.spanner.admin.instance.v1.InstanceConfig.name].
@@ -1522,9 +1521,9 @@ public final UnaryCallable getInstance
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Updates an instance configuration. The returned [long-running
- * operation][google.longrunning.Operation] can be used to track the progress of updating the
- * instance. If the named instance configuration does not exist, returns `NOT_FOUND`.
+ * Updates an instance configuration. The returned long-running operation can be used to track the
+ * progress of updating the instance. If the named instance configuration does not exist, returns
+ * `NOT_FOUND`.
*
* Only user-managed configurations can be updated.
*
@@ -1550,13 +1549,12 @@ public final UnaryCallable getInstance
* configuration's [reconciling][google.spanner.admin.instance.v1.InstanceConfig.reconciling]
* field becomes false.
*
- * The returned [long-running operation][google.longrunning.Operation] will have a name of the
- * format `<instance_config_name>/operations/<operation_id>` and can be used to track
- * the instance configuration modification. The [metadata][google.longrunning.Operation.metadata]
- * field type is
+ * The returned long-running operation will have a name of the format
+ * `<instance_config_name>/operations/<operation_id>` and can be used to track the
+ * instance configuration modification. The metadata field type is
* [UpdateInstanceConfigMetadata][google.spanner.admin.instance.v1.UpdateInstanceConfigMetadata].
- * The [response][google.longrunning.Operation.response] field type is
- * [InstanceConfig][google.spanner.admin.instance.v1.InstanceConfig], if successful.
+ * The response field type is [InstanceConfig][google.spanner.admin.instance.v1.InstanceConfig],
+ * if successful.
*
* Authorization requires `spanner.instanceConfigs.update` permission on the resource
* [name][google.spanner.admin.instance.v1.InstanceConfig.name].
@@ -1591,9 +1589,9 @@ public final UnaryCallable getInstance
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Updates an instance configuration. The returned [long-running
- * operation][google.longrunning.Operation] can be used to track the progress of updating the
- * instance. If the named instance configuration does not exist, returns `NOT_FOUND`.
+ * Updates an instance configuration. The returned long-running operation can be used to track the
+ * progress of updating the instance. If the named instance configuration does not exist, returns
+ * `NOT_FOUND`.
*
* Only user-managed configurations can be updated.
*
@@ -1619,13 +1617,12 @@ public final UnaryCallable getInstance
* configuration's [reconciling][google.spanner.admin.instance.v1.InstanceConfig.reconciling]
* field becomes false.
*
- * The returned [long-running operation][google.longrunning.Operation] will have a name of the
- * format `<instance_config_name>/operations/<operation_id>` and can be used to track
- * the instance configuration modification. The [metadata][google.longrunning.Operation.metadata]
- * field type is
+ * The returned long-running operation will have a name of the format
+ * `<instance_config_name>/operations/<operation_id>` and can be used to track the
+ * instance configuration modification. The metadata field type is
* [UpdateInstanceConfigMetadata][google.spanner.admin.instance.v1.UpdateInstanceConfigMetadata].
- * The [response][google.longrunning.Operation.response] field type is
- * [InstanceConfig][google.spanner.admin.instance.v1.InstanceConfig], if successful.
+ * The response field type is [InstanceConfig][google.spanner.admin.instance.v1.InstanceConfig],
+ * if successful.
*
* Authorization requires `spanner.instanceConfigs.update` permission on the resource
* [name][google.spanner.admin.instance.v1.InstanceConfig.name].
@@ -1801,15 +1798,14 @@ public final UnaryCallable deleteInstanceCon
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Lists the user-managed instance configuration [long-running
- * operations][google.longrunning.Operation] in the given project. An instance configuration
- * operation has a name of the form
+ * Lists the user-managed instance configuration long-running operations in the given project. An
+ * instance configuration operation has a name of the form
* `projects/<project>/instanceConfigs/<instance_config>/operations/<operation>`.
- * The long-running operation [metadata][google.longrunning.Operation.metadata] field type
- * `metadata.type_url` describes the type of the metadata. Operations returned include those that
- * have completed/failed/canceled within the last 7 days, and pending operations. Operations
- * returned are ordered by `operation.metadata.value.start_time` in descending order starting from
- * the most recently started operation.
+ * The long-running operation metadata field type `metadata.type_url` describes the type of the
+ * metadata. Operations returned include those that have completed/failed/canceled within the last
+ * 7 days, and pending operations. Operations returned are ordered by
+ * `operation.metadata.value.start_time` in descending order starting from the most recently
+ * started operation.
*
* Sample code:
*
@@ -1843,15 +1839,14 @@ public final ListInstanceConfigOperationsPagedResponse listInstanceConfigOperati
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Lists the user-managed instance configuration [long-running
- * operations][google.longrunning.Operation] in the given project. An instance configuration
- * operation has a name of the form
+ * Lists the user-managed instance configuration long-running operations in the given project. An
+ * instance configuration operation has a name of the form
* `projects/<project>/instanceConfigs/<instance_config>/operations/<operation>`.
- * The long-running operation [metadata][google.longrunning.Operation.metadata] field type
- * `metadata.type_url` describes the type of the metadata. Operations returned include those that
- * have completed/failed/canceled within the last 7 days, and pending operations. Operations
- * returned are ordered by `operation.metadata.value.start_time` in descending order starting from
- * the most recently started operation.
+ * The long-running operation metadata field type `metadata.type_url` describes the type of the
+ * metadata. Operations returned include those that have completed/failed/canceled within the last
+ * 7 days, and pending operations. Operations returned are ordered by
+ * `operation.metadata.value.start_time` in descending order starting from the most recently
+ * started operation.
*
* Sample code:
*
@@ -1883,15 +1878,14 @@ public final ListInstanceConfigOperationsPagedResponse listInstanceConfigOperati
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Lists the user-managed instance configuration [long-running
- * operations][google.longrunning.Operation] in the given project. An instance configuration
- * operation has a name of the form
+ * Lists the user-managed instance configuration long-running operations in the given project. An
+ * instance configuration operation has a name of the form
* `projects/<project>/instanceConfigs/<instance_config>/operations/<operation>`.
- * The long-running operation [metadata][google.longrunning.Operation.metadata] field type
- * `metadata.type_url` describes the type of the metadata. Operations returned include those that
- * have completed/failed/canceled within the last 7 days, and pending operations. Operations
- * returned are ordered by `operation.metadata.value.start_time` in descending order starting from
- * the most recently started operation.
+ * The long-running operation metadata field type `metadata.type_url` describes the type of the
+ * metadata. Operations returned include those that have completed/failed/canceled within the last
+ * 7 days, and pending operations. Operations returned are ordered by
+ * `operation.metadata.value.start_time` in descending order starting from the most recently
+ * started operation.
*
* Sample code:
*
@@ -1926,15 +1920,14 @@ public final ListInstanceConfigOperationsPagedResponse listInstanceConfigOperati
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Lists the user-managed instance configuration [long-running
- * operations][google.longrunning.Operation] in the given project. An instance configuration
- * operation has a name of the form
+ * Lists the user-managed instance configuration long-running operations in the given project. An
+ * instance configuration operation has a name of the form
* `projects/<project>/instanceConfigs/<instance_config>/operations/<operation>`.
- * The long-running operation [metadata][google.longrunning.Operation.metadata] field type
- * `metadata.type_url` describes the type of the metadata. Operations returned include those that
- * have completed/failed/canceled within the last 7 days, and pending operations. Operations
- * returned are ordered by `operation.metadata.value.start_time` in descending order starting from
- * the most recently started operation.
+ * The long-running operation metadata field type `metadata.type_url` describes the type of the
+ * metadata. Operations returned include those that have completed/failed/canceled within the last
+ * 7 days, and pending operations. Operations returned are ordered by
+ * `operation.metadata.value.start_time` in descending order starting from the most recently
+ * started operation.
*
* Sample code:
*
@@ -1969,15 +1962,14 @@ public final ListInstanceConfigOperationsPagedResponse listInstanceConfigOperati
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Lists the user-managed instance configuration [long-running
- * operations][google.longrunning.Operation] in the given project. An instance configuration
- * operation has a name of the form
+ * Lists the user-managed instance configuration long-running operations in the given project. An
+ * instance configuration operation has a name of the form
* `projects/<project>/instanceConfigs/<instance_config>/operations/<operation>`.
- * The long-running operation [metadata][google.longrunning.Operation.metadata] field type
- * `metadata.type_url` describes the type of the metadata. Operations returned include those that
- * have completed/failed/canceled within the last 7 days, and pending operations. Operations
- * returned are ordered by `operation.metadata.value.start_time` in descending order starting from
- * the most recently started operation.
+ * The long-running operation metadata field type `metadata.type_url` describes the type of the
+ * metadata. Operations returned include those that have completed/failed/canceled within the last
+ * 7 days, and pending operations. Operations returned are ordered by
+ * `operation.metadata.value.start_time` in descending order starting from the most recently
+ * started operation.
*
* Sample code:
*
@@ -2209,7 +2201,9 @@ public final UnaryCallable listInst
* }
*
* @param parent Required. The instance whose instance partitions should be listed. Values are of
- * the form `projects/<project>/instances/<instance>`.
+ * the form `projects/<project>/instances/<instance>`. Use `{instance} = '-'` to
+ * list instance partitions for all Instances in a project, e.g.,
+ * `projects/myproject/instances/-`.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final ListInstancePartitionsPagedResponse listInstancePartitions(InstanceName parent) {
@@ -2242,7 +2236,9 @@ public final ListInstancePartitionsPagedResponse listInstancePartitions(Instance
* }
*
* @param parent Required. The instance whose instance partitions should be listed. Values are of
- * the form `projects/<project>/instances/<instance>`.
+ * the form `projects/<project>/instances/<instance>`. Use `{instance} = '-'` to
+ * list instance partitions for all Instances in a project, e.g.,
+ * `projects/myproject/instances/-`.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final ListInstancePartitionsPagedResponse listInstancePartitions(String parent) {
@@ -2475,10 +2471,10 @@ public final UnaryCallable getInstanceCallable() {
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Creates an instance and begins preparing it to begin serving. The returned [long-running
- * operation][google.longrunning.Operation] can be used to track the progress of preparing the new
- * instance. The instance name is assigned by the caller. If the named instance already exists,
- * `CreateInstance` returns `ALREADY_EXISTS`.
+ * Creates an instance and begins preparing it to begin serving. The returned long-running
+ * operation can be used to track the progress of preparing the new instance. The instance name is
+ * assigned by the caller. If the named instance already exists, `CreateInstance` returns
+ * `ALREADY_EXISTS`.
*
* Immediately upon completion of this request:
*
@@ -2498,12 +2494,11 @@ public final UnaryCallable getInstanceCallable() {
* instance's allocated resource levels are readable via the API. * The instance's state
* becomes `READY`.
*
- * The returned [long-running operation][google.longrunning.Operation] will have a name of the
- * format `<instance_name>/operations/<operation_id>` and can be used to track
- * creation of the instance. The [metadata][google.longrunning.Operation.metadata] field type is
- * [CreateInstanceMetadata][google.spanner.admin.instance.v1.CreateInstanceMetadata]. The
- * [response][google.longrunning.Operation.response] field type is
- * [Instance][google.spanner.admin.instance.v1.Instance], if successful.
+ * The returned long-running operation will have a name of the format
+ * `<instance_name>/operations/<operation_id>` and can be used to track creation of
+ * the instance. The metadata field type is
+ * [CreateInstanceMetadata][google.spanner.admin.instance.v1.CreateInstanceMetadata]. The response
+ * field type is [Instance][google.spanner.admin.instance.v1.Instance], if successful.
*
* Sample code:
*
@@ -2543,10 +2538,10 @@ public final OperationFuture createInstanceAsy
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Creates an instance and begins preparing it to begin serving. The returned [long-running
- * operation][google.longrunning.Operation] can be used to track the progress of preparing the new
- * instance. The instance name is assigned by the caller. If the named instance already exists,
- * `CreateInstance` returns `ALREADY_EXISTS`.
+ * Creates an instance and begins preparing it to begin serving. The returned long-running
+ * operation can be used to track the progress of preparing the new instance. The instance name is
+ * assigned by the caller. If the named instance already exists, `CreateInstance` returns
+ * `ALREADY_EXISTS`.
*
* Immediately upon completion of this request:
*
@@ -2566,12 +2561,11 @@ public final OperationFuture createInstanceAsy
* instance's allocated resource levels are readable via the API. * The instance's state
* becomes `READY`.
*
- * The returned [long-running operation][google.longrunning.Operation] will have a name of the
- * format `<instance_name>/operations/<operation_id>` and can be used to track
- * creation of the instance. The [metadata][google.longrunning.Operation.metadata] field type is
- * [CreateInstanceMetadata][google.spanner.admin.instance.v1.CreateInstanceMetadata]. The
- * [response][google.longrunning.Operation.response] field type is
- * [Instance][google.spanner.admin.instance.v1.Instance], if successful.
+ * The returned long-running operation will have a name of the format
+ * `<instance_name>/operations/<operation_id>` and can be used to track creation of
+ * the instance. The metadata field type is
+ * [CreateInstanceMetadata][google.spanner.admin.instance.v1.CreateInstanceMetadata]. The response
+ * field type is [Instance][google.spanner.admin.instance.v1.Instance], if successful.
*
* Sample code:
*
@@ -2611,10 +2605,10 @@ public final OperationFuture createInstanceAsy
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Creates an instance and begins preparing it to begin serving. The returned [long-running
- * operation][google.longrunning.Operation] can be used to track the progress of preparing the new
- * instance. The instance name is assigned by the caller. If the named instance already exists,
- * `CreateInstance` returns `ALREADY_EXISTS`.
+ * Creates an instance and begins preparing it to begin serving. The returned long-running
+ * operation can be used to track the progress of preparing the new instance. The instance name is
+ * assigned by the caller. If the named instance already exists, `CreateInstance` returns
+ * `ALREADY_EXISTS`.
*
* Immediately upon completion of this request:
*
@@ -2634,12 +2628,11 @@ public final OperationFuture createInstanceAsy
* instance's allocated resource levels are readable via the API. * The instance's state
* becomes `READY`.
*
- * The returned [long-running operation][google.longrunning.Operation] will have a name of the
- * format `<instance_name>/operations/<operation_id>` and can be used to track
- * creation of the instance. The [metadata][google.longrunning.Operation.metadata] field type is
- * [CreateInstanceMetadata][google.spanner.admin.instance.v1.CreateInstanceMetadata]. The
- * [response][google.longrunning.Operation.response] field type is
- * [Instance][google.spanner.admin.instance.v1.Instance], if successful.
+ * The returned long-running operation will have a name of the format
+ * `<instance_name>/operations/<operation_id>` and can be used to track creation of
+ * the instance. The metadata field type is
+ * [CreateInstanceMetadata][google.spanner.admin.instance.v1.CreateInstanceMetadata]. The response
+ * field type is [Instance][google.spanner.admin.instance.v1.Instance], if successful.
*
* Sample code:
*
@@ -2670,10 +2663,10 @@ public final OperationFuture createInstanceAsy
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Creates an instance and begins preparing it to begin serving. The returned [long-running
- * operation][google.longrunning.Operation] can be used to track the progress of preparing the new
- * instance. The instance name is assigned by the caller. If the named instance already exists,
- * `CreateInstance` returns `ALREADY_EXISTS`.
+ * Creates an instance and begins preparing it to begin serving. The returned long-running
+ * operation can be used to track the progress of preparing the new instance. The instance name is
+ * assigned by the caller. If the named instance already exists, `CreateInstance` returns
+ * `ALREADY_EXISTS`.
*
* Immediately upon completion of this request:
*
@@ -2693,12 +2686,11 @@ public final OperationFuture createInstanceAsy
* instance's allocated resource levels are readable via the API. * The instance's state
* becomes `READY`.
*
- * The returned [long-running operation][google.longrunning.Operation] will have a name of the
- * format `<instance_name>/operations/<operation_id>` and can be used to track
- * creation of the instance. The [metadata][google.longrunning.Operation.metadata] field type is
- * [CreateInstanceMetadata][google.spanner.admin.instance.v1.CreateInstanceMetadata]. The
- * [response][google.longrunning.Operation.response] field type is
- * [Instance][google.spanner.admin.instance.v1.Instance], if successful.
+ * The returned long-running operation will have a name of the format
+ * `<instance_name>/operations/<operation_id>` and can be used to track creation of
+ * the instance. The metadata field type is
+ * [CreateInstanceMetadata][google.spanner.admin.instance.v1.CreateInstanceMetadata]. The response
+ * field type is [Instance][google.spanner.admin.instance.v1.Instance], if successful.
*
* Sample code:
*
@@ -2729,10 +2721,10 @@ public final OperationFuture createInstanceAsy
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Creates an instance and begins preparing it to begin serving. The returned [long-running
- * operation][google.longrunning.Operation] can be used to track the progress of preparing the new
- * instance. The instance name is assigned by the caller. If the named instance already exists,
- * `CreateInstance` returns `ALREADY_EXISTS`.
+ * Creates an instance and begins preparing it to begin serving. The returned long-running
+ * operation can be used to track the progress of preparing the new instance. The instance name is
+ * assigned by the caller. If the named instance already exists, `CreateInstance` returns
+ * `ALREADY_EXISTS`.
*
* Immediately upon completion of this request:
*
@@ -2752,12 +2744,11 @@ public final OperationFuture createInstanceAsy
* instance's allocated resource levels are readable via the API. * The instance's state
* becomes `READY`.
*
- * The returned [long-running operation][google.longrunning.Operation] will have a name of the
- * format `<instance_name>/operations/<operation_id>` and can be used to track
- * creation of the instance. The [metadata][google.longrunning.Operation.metadata] field type is
- * [CreateInstanceMetadata][google.spanner.admin.instance.v1.CreateInstanceMetadata]. The
- * [response][google.longrunning.Operation.response] field type is
- * [Instance][google.spanner.admin.instance.v1.Instance], if successful.
+ * The returned long-running operation will have a name of the format
+ * `<instance_name>/operations/<operation_id>` and can be used to track creation of
+ * the instance. The metadata field type is
+ * [CreateInstanceMetadata][google.spanner.admin.instance.v1.CreateInstanceMetadata]. The response
+ * field type is [Instance][google.spanner.admin.instance.v1.Instance], if successful.
*
* Sample code:
*
@@ -2788,8 +2779,8 @@ public final UnaryCallable createInstanceCalla
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Updates an instance, and begins allocating or releasing resources as requested. The returned
- * [long-running operation][google.longrunning.Operation] can be used to track the progress of
- * updating the instance. If the named instance does not exist, returns `NOT_FOUND`.
+ * long-running operation can be used to track the progress of updating the instance. If the named
+ * instance does not exist, returns `NOT_FOUND`.
*
* Immediately upon completion of this request:
*
@@ -2811,12 +2802,11 @@ public final UnaryCallable createInstanceCalla
* than the requested levels). * All newly-reserved resources are available for serving the
* instance's tables. * The instance's new resource levels are readable via the API.
*
- * The returned [long-running operation][google.longrunning.Operation] will have a name of the
- * format `<instance_name>/operations/<operation_id>` and can be used to track the
- * instance modification. The [metadata][google.longrunning.Operation.metadata] field type is
- * [UpdateInstanceMetadata][google.spanner.admin.instance.v1.UpdateInstanceMetadata]. The
- * [response][google.longrunning.Operation.response] field type is
- * [Instance][google.spanner.admin.instance.v1.Instance], if successful.
+ * The returned long-running operation will have a name of the format
+ * `<instance_name>/operations/<operation_id>` and can be used to track the instance
+ * modification. The metadata field type is
+ * [UpdateInstanceMetadata][google.spanner.admin.instance.v1.UpdateInstanceMetadata]. The response
+ * field type is [Instance][google.spanner.admin.instance.v1.Instance], if successful.
*
* Authorization requires `spanner.instances.update` permission on the resource
* [name][google.spanner.admin.instance.v1.Instance.name].
@@ -2857,8 +2847,8 @@ public final OperationFuture updateInstanceAsy
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Updates an instance, and begins allocating or releasing resources as requested. The returned
- * [long-running operation][google.longrunning.Operation] can be used to track the progress of
- * updating the instance. If the named instance does not exist, returns `NOT_FOUND`.
+ * long-running operation can be used to track the progress of updating the instance. If the named
+ * instance does not exist, returns `NOT_FOUND`.
*
* Immediately upon completion of this request:
*
@@ -2880,12 +2870,11 @@ public final OperationFuture updateInstanceAsy
* than the requested levels). * All newly-reserved resources are available for serving the
* instance's tables. * The instance's new resource levels are readable via the API.
*
- * The returned [long-running operation][google.longrunning.Operation] will have a name of the
- * format `<instance_name>/operations/<operation_id>` and can be used to track the
- * instance modification. The [metadata][google.longrunning.Operation.metadata] field type is
- * [UpdateInstanceMetadata][google.spanner.admin.instance.v1.UpdateInstanceMetadata]. The
- * [response][google.longrunning.Operation.response] field type is
- * [Instance][google.spanner.admin.instance.v1.Instance], if successful.
+ * The returned long-running operation will have a name of the format
+ * `<instance_name>/operations/<operation_id>` and can be used to track the instance
+ * modification. The metadata field type is
+ * [UpdateInstanceMetadata][google.spanner.admin.instance.v1.UpdateInstanceMetadata]. The response
+ * field type is [Instance][google.spanner.admin.instance.v1.Instance], if successful.
*
* Authorization requires `spanner.instances.update` permission on the resource
* [name][google.spanner.admin.instance.v1.Instance.name].
@@ -2919,8 +2908,8 @@ public final OperationFuture updateInstanceAsy
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Updates an instance, and begins allocating or releasing resources as requested. The returned
- * [long-running operation][google.longrunning.Operation] can be used to track the progress of
- * updating the instance. If the named instance does not exist, returns `NOT_FOUND`.
+ * long-running operation can be used to track the progress of updating the instance. If the named
+ * instance does not exist, returns `NOT_FOUND`.
*
* Immediately upon completion of this request:
*
@@ -2942,12 +2931,11 @@ public final OperationFuture updateInstanceAsy
* than the requested levels). * All newly-reserved resources are available for serving the
* instance's tables. * The instance's new resource levels are readable via the API.
*
- * The returned [long-running operation][google.longrunning.Operation] will have a name of the
- * format `<instance_name>/operations/<operation_id>` and can be used to track the
- * instance modification. The [metadata][google.longrunning.Operation.metadata] field type is
- * [UpdateInstanceMetadata][google.spanner.admin.instance.v1.UpdateInstanceMetadata]. The
- * [response][google.longrunning.Operation.response] field type is
- * [Instance][google.spanner.admin.instance.v1.Instance], if successful.
+ * The returned long-running operation will have a name of the format
+ * `<instance_name>/operations/<operation_id>` and can be used to track the instance
+ * modification. The metadata field type is
+ * [UpdateInstanceMetadata][google.spanner.admin.instance.v1.UpdateInstanceMetadata]. The response
+ * field type is [Instance][google.spanner.admin.instance.v1.Instance], if successful.
*
* Authorization requires `spanner.instances.update` permission on the resource
* [name][google.spanner.admin.instance.v1.Instance.name].
@@ -2981,8 +2969,8 @@ public final OperationFuture updateInstanceAsy
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Updates an instance, and begins allocating or releasing resources as requested. The returned
- * [long-running operation][google.longrunning.Operation] can be used to track the progress of
- * updating the instance. If the named instance does not exist, returns `NOT_FOUND`.
+ * long-running operation can be used to track the progress of updating the instance. If the named
+ * instance does not exist, returns `NOT_FOUND`.
*
* Immediately upon completion of this request:
*
@@ -3004,12 +2992,11 @@ public final OperationFuture updateInstanceAsy
* than the requested levels). * All newly-reserved resources are available for serving the
* instance's tables. * The instance's new resource levels are readable via the API.
*
- * The returned [long-running operation][google.longrunning.Operation] will have a name of the
- * format `<instance_name>/operations/<operation_id>` and can be used to track the
- * instance modification. The [metadata][google.longrunning.Operation.metadata] field type is
- * [UpdateInstanceMetadata][google.spanner.admin.instance.v1.UpdateInstanceMetadata]. The
- * [response][google.longrunning.Operation.response] field type is
- * [Instance][google.spanner.admin.instance.v1.Instance], if successful.
+ * The returned long-running operation will have a name of the format
+ * `<instance_name>/operations/<operation_id>` and can be used to track the instance
+ * modification. The metadata field type is
+ * [UpdateInstanceMetadata][google.spanner.admin.instance.v1.UpdateInstanceMetadata]. The response
+ * field type is [Instance][google.spanner.admin.instance.v1.Instance], if successful.
*
* Authorization requires `spanner.instances.update` permission on the resource
* [name][google.spanner.admin.instance.v1.Instance.name].
@@ -3725,10 +3712,10 @@ public final InstancePartition getInstancePartition(GetInstancePartitionRequest
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Creates an instance partition and begins preparing it to be used. The returned [long-running
- * operation][google.longrunning.Operation] can be used to track the progress of preparing the new
- * instance partition. The instance partition name is assigned by the caller. If the named
- * instance partition already exists, `CreateInstancePartition` returns `ALREADY_EXISTS`.
+ * Creates an instance partition and begins preparing it to be used. The returned long-running
+ * operation can be used to track the progress of preparing the new instance partition. The
+ * instance partition name is assigned by the caller. If the named instance partition already
+ * exists, `CreateInstancePartition` returns `ALREADY_EXISTS`.
*
* Immediately upon completion of this request:
*
@@ -3748,12 +3735,11 @@ public final InstancePartition getInstancePartition(GetInstancePartitionRequest
* instance partition's allocated resource levels are readable via the API. * The instance
* partition's state becomes `READY`.
*
- * The returned [long-running operation][google.longrunning.Operation] will have a name of the
- * format `<instance_partition_name>/operations/<operation_id>` and can be used to
- * track creation of the instance partition. The [metadata][google.longrunning.Operation.metadata]
- * field type is
+ * The returned long-running operation will have a name of the format
+ * `<instance_partition_name>/operations/<operation_id>` and can be used to track
+ * creation of the instance partition. The metadata field type is
* [CreateInstancePartitionMetadata][google.spanner.admin.instance.v1.CreateInstancePartitionMetadata].
- * The [response][google.longrunning.Operation.response] field type is
+ * The response field type is
* [InstancePartition][google.spanner.admin.instance.v1.InstancePartition], if successful.
*
* Sample code:
@@ -3799,10 +3785,10 @@ public final InstancePartition getInstancePartition(GetInstancePartitionRequest
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Creates an instance partition and begins preparing it to be used. The returned [long-running
- * operation][google.longrunning.Operation] can be used to track the progress of preparing the new
- * instance partition. The instance partition name is assigned by the caller. If the named
- * instance partition already exists, `CreateInstancePartition` returns `ALREADY_EXISTS`.
+ * Creates an instance partition and begins preparing it to be used. The returned long-running
+ * operation can be used to track the progress of preparing the new instance partition. The
+ * instance partition name is assigned by the caller. If the named instance partition already
+ * exists, `CreateInstancePartition` returns `ALREADY_EXISTS`.
*
* Immediately upon completion of this request:
*
@@ -3822,12 +3808,11 @@ public final InstancePartition getInstancePartition(GetInstancePartitionRequest
* instance partition's allocated resource levels are readable via the API. * The instance
* partition's state becomes `READY`.
*
- * The returned [long-running operation][google.longrunning.Operation] will have a name of the
- * format `<instance_partition_name>/operations/<operation_id>` and can be used to
- * track creation of the instance partition. The [metadata][google.longrunning.Operation.metadata]
- * field type is
+ * The returned long-running operation will have a name of the format
+ * `<instance_partition_name>/operations/<operation_id>` and can be used to track
+ * creation of the instance partition. The metadata field type is
* [CreateInstancePartitionMetadata][google.spanner.admin.instance.v1.CreateInstancePartitionMetadata].
- * The [response][google.longrunning.Operation.response] field type is
+ * The response field type is
* [InstancePartition][google.spanner.admin.instance.v1.InstancePartition], if successful.
*
* Sample code:
@@ -3873,10 +3858,10 @@ public final InstancePartition getInstancePartition(GetInstancePartitionRequest
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Creates an instance partition and begins preparing it to be used. The returned [long-running
- * operation][google.longrunning.Operation] can be used to track the progress of preparing the new
- * instance partition. The instance partition name is assigned by the caller. If the named
- * instance partition already exists, `CreateInstancePartition` returns `ALREADY_EXISTS`.
+ * Creates an instance partition and begins preparing it to be used. The returned long-running
+ * operation can be used to track the progress of preparing the new instance partition. The
+ * instance partition name is assigned by the caller. If the named instance partition already
+ * exists, `CreateInstancePartition` returns `ALREADY_EXISTS`.
*
* Immediately upon completion of this request:
*
@@ -3896,12 +3881,11 @@ public final InstancePartition getInstancePartition(GetInstancePartitionRequest
* instance partition's allocated resource levels are readable via the API. * The instance
* partition's state becomes `READY`.
*
- * The returned [long-running operation][google.longrunning.Operation] will have a name of the
- * format `<instance_partition_name>/operations/<operation_id>` and can be used to
- * track creation of the instance partition. The [metadata][google.longrunning.Operation.metadata]
- * field type is
+ * The returned long-running operation will have a name of the format
+ * `<instance_partition_name>/operations/<operation_id>` and can be used to track
+ * creation of the instance partition. The metadata field type is
* [CreateInstancePartitionMetadata][google.spanner.admin.instance.v1.CreateInstancePartitionMetadata].
- * The [response][google.longrunning.Operation.response] field type is
+ * The response field type is
* [InstancePartition][google.spanner.admin.instance.v1.InstancePartition], if successful.
*
* Sample code:
@@ -3933,10 +3917,10 @@ public final InstancePartition getInstancePartition(GetInstancePartitionRequest
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Creates an instance partition and begins preparing it to be used. The returned [long-running
- * operation][google.longrunning.Operation] can be used to track the progress of preparing the new
- * instance partition. The instance partition name is assigned by the caller. If the named
- * instance partition already exists, `CreateInstancePartition` returns `ALREADY_EXISTS`.
+ * Creates an instance partition and begins preparing it to be used. The returned long-running
+ * operation can be used to track the progress of preparing the new instance partition. The
+ * instance partition name is assigned by the caller. If the named instance partition already
+ * exists, `CreateInstancePartition` returns `ALREADY_EXISTS`.
*
* Immediately upon completion of this request:
*
@@ -3956,12 +3940,11 @@ public final InstancePartition getInstancePartition(GetInstancePartitionRequest
* instance partition's allocated resource levels are readable via the API. * The instance
* partition's state becomes `READY`.
*
- * The returned [long-running operation][google.longrunning.Operation] will have a name of the
- * format `<instance_partition_name>/operations/<operation_id>` and can be used to
- * track creation of the instance partition. The [metadata][google.longrunning.Operation.metadata]
- * field type is
+ * The returned long-running operation will have a name of the format
+ * `<instance_partition_name>/operations/<operation_id>` and can be used to track
+ * creation of the instance partition. The metadata field type is
* [CreateInstancePartitionMetadata][google.spanner.admin.instance.v1.CreateInstancePartitionMetadata].
- * The [response][google.longrunning.Operation.response] field type is
+ * The response field type is
* [InstancePartition][google.spanner.admin.instance.v1.InstancePartition], if successful.
*
* Sample code:
@@ -3994,10 +3977,10 @@ public final InstancePartition getInstancePartition(GetInstancePartitionRequest
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Creates an instance partition and begins preparing it to be used. The returned [long-running
- * operation][google.longrunning.Operation] can be used to track the progress of preparing the new
- * instance partition. The instance partition name is assigned by the caller. If the named
- * instance partition already exists, `CreateInstancePartition` returns `ALREADY_EXISTS`.
+ * Creates an instance partition and begins preparing it to be used. The returned long-running
+ * operation can be used to track the progress of preparing the new instance partition. The
+ * instance partition name is assigned by the caller. If the named instance partition already
+ * exists, `CreateInstancePartition` returns `ALREADY_EXISTS`.
*
* Immediately upon completion of this request:
*
@@ -4017,12 +4000,11 @@ public final InstancePartition getInstancePartition(GetInstancePartitionRequest
* instance partition's allocated resource levels are readable via the API. * The instance
* partition's state becomes `READY`.
*
- * The returned [long-running operation][google.longrunning.Operation] will have a name of the
- * format `<instance_partition_name>/operations/<operation_id>` and can be used to
- * track creation of the instance partition. The [metadata][google.longrunning.Operation.metadata]
- * field type is
+ * The returned long-running operation will have a name of the format
+ * `<instance_partition_name>/operations/<operation_id>` and can be used to track
+ * creation of the instance partition. The metadata field type is
* [CreateInstancePartitionMetadata][google.spanner.admin.instance.v1.CreateInstancePartitionMetadata].
- * The [response][google.longrunning.Operation.response] field type is
+ * The response field type is
* [InstancePartition][google.spanner.admin.instance.v1.InstancePartition], if successful.
*
* Sample code:
@@ -4194,9 +4176,8 @@ public final void deleteInstancePartition(DeleteInstancePartitionRequest request
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Updates an instance partition, and begins allocating or releasing resources as requested. The
- * returned [long-running operation][google.longrunning.Operation] can be used to track the
- * progress of updating the instance partition. If the named instance partition does not exist,
- * returns `NOT_FOUND`.
+ * returned long-running operation can be used to track the progress of updating the instance
+ * partition. If the named instance partition does not exist, returns `NOT_FOUND`.
*
* Immediately upon completion of this request:
*
@@ -4219,12 +4200,11 @@ public final void deleteInstancePartition(DeleteInstancePartitionRequest request
* instance partition's tables. * The instance partition's new resource levels are readable
* via the API.
*
- * The returned [long-running operation][google.longrunning.Operation] will have a name of the
- * format `<instance_partition_name>/operations/<operation_id>` and can be used to
- * track the instance partition modification. The
- * [metadata][google.longrunning.Operation.metadata] field type is
+ * The returned long-running operation will have a name of the format
+ * `<instance_partition_name>/operations/<operation_id>` and can be used to track the
+ * instance partition modification. The metadata field type is
* [UpdateInstancePartitionMetadata][google.spanner.admin.instance.v1.UpdateInstancePartitionMetadata].
- * The [response][google.longrunning.Operation.response] field type is
+ * The response field type is
* [InstancePartition][google.spanner.admin.instance.v1.InstancePartition], if successful.
*
* Authorization requires `spanner.instancePartitions.update` permission on the resource
@@ -4270,9 +4250,8 @@ public final void deleteInstancePartition(DeleteInstancePartitionRequest request
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Updates an instance partition, and begins allocating or releasing resources as requested. The
- * returned [long-running operation][google.longrunning.Operation] can be used to track the
- * progress of updating the instance partition. If the named instance partition does not exist,
- * returns `NOT_FOUND`.
+ * returned long-running operation can be used to track the progress of updating the instance
+ * partition. If the named instance partition does not exist, returns `NOT_FOUND`.
*
* Immediately upon completion of this request:
*
@@ -4295,12 +4274,11 @@ public final void deleteInstancePartition(DeleteInstancePartitionRequest request
* instance partition's tables. * The instance partition's new resource levels are readable
* via the API.
*
- * The returned [long-running operation][google.longrunning.Operation] will have a name of the
- * format `<instance_partition_name>/operations/<operation_id>` and can be used to
- * track the instance partition modification. The
- * [metadata][google.longrunning.Operation.metadata] field type is
+ * The returned long-running operation will have a name of the format
+ * `<instance_partition_name>/operations/<operation_id>` and can be used to track the
+ * instance partition modification. The metadata field type is
* [UpdateInstancePartitionMetadata][google.spanner.admin.instance.v1.UpdateInstancePartitionMetadata].
- * The [response][google.longrunning.Operation.response] field type is
+ * The response field type is
* [InstancePartition][google.spanner.admin.instance.v1.InstancePartition], if successful.
*
* Authorization requires `spanner.instancePartitions.update` permission on the resource
@@ -4335,9 +4313,8 @@ public final void deleteInstancePartition(DeleteInstancePartitionRequest request
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Updates an instance partition, and begins allocating or releasing resources as requested. The
- * returned [long-running operation][google.longrunning.Operation] can be used to track the
- * progress of updating the instance partition. If the named instance partition does not exist,
- * returns `NOT_FOUND`.
+ * returned long-running operation can be used to track the progress of updating the instance
+ * partition. If the named instance partition does not exist, returns `NOT_FOUND`.
*
* Immediately upon completion of this request:
*
@@ -4360,12 +4337,11 @@ public final void deleteInstancePartition(DeleteInstancePartitionRequest request
* instance partition's tables. * The instance partition's new resource levels are readable
* via the API.
*
- * The returned [long-running operation][google.longrunning.Operation] will have a name of the
- * format `<instance_partition_name>/operations/<operation_id>` and can be used to
- * track the instance partition modification. The
- * [metadata][google.longrunning.Operation.metadata] field type is
+ * The returned long-running operation will have a name of the format
+ * `<instance_partition_name>/operations/<operation_id>` and can be used to track the
+ * instance partition modification. The metadata field type is
* [UpdateInstancePartitionMetadata][google.spanner.admin.instance.v1.UpdateInstancePartitionMetadata].
- * The [response][google.longrunning.Operation.response] field type is
+ * The response field type is
* [InstancePartition][google.spanner.admin.instance.v1.InstancePartition], if successful.
*
* Authorization requires `spanner.instancePartitions.update` permission on the resource
@@ -4401,9 +4377,8 @@ public final void deleteInstancePartition(DeleteInstancePartitionRequest request
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Updates an instance partition, and begins allocating or releasing resources as requested. The
- * returned [long-running operation][google.longrunning.Operation] can be used to track the
- * progress of updating the instance partition. If the named instance partition does not exist,
- * returns `NOT_FOUND`.
+ * returned long-running operation can be used to track the progress of updating the instance
+ * partition. If the named instance partition does not exist, returns `NOT_FOUND`.
*
* Immediately upon completion of this request:
*
@@ -4426,12 +4401,11 @@ public final void deleteInstancePartition(DeleteInstancePartitionRequest request
* instance partition's tables. * The instance partition's new resource levels are readable
* via the API.
*
- * The returned [long-running operation][google.longrunning.Operation] will have a name of the
- * format `<instance_partition_name>/operations/<operation_id>` and can be used to
- * track the instance partition modification. The
- * [metadata][google.longrunning.Operation.metadata] field type is
+ * The returned long-running operation will have a name of the format
+ * `<instance_partition_name>/operations/<operation_id>` and can be used to track the
+ * instance partition modification. The metadata field type is
* [UpdateInstancePartitionMetadata][google.spanner.admin.instance.v1.UpdateInstancePartitionMetadata].
- * The [response][google.longrunning.Operation.response] field type is
+ * The response field type is
* [InstancePartition][google.spanner.admin.instance.v1.InstancePartition], if successful.
*
* Authorization requires `spanner.instancePartitions.update` permission on the resource
@@ -4465,14 +4439,14 @@ public final void deleteInstancePartition(DeleteInstancePartitionRequest request
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Lists instance partition [long-running operations][google.longrunning.Operation] in the given
- * instance. An instance partition operation has a name of the form
+ * Lists instance partition long-running operations in the given instance. An instance partition
+ * operation has a name of the form
* `projects/<project>/instances/<instance>/instancePartitions/<instance_partition>/operations/<operation>`.
- * The long-running operation [metadata][google.longrunning.Operation.metadata] field type
- * `metadata.type_url` describes the type of the metadata. Operations returned include those that
- * have completed/failed/canceled within the last 7 days, and pending operations. Operations
- * returned are ordered by `operation.metadata.value.start_time` in descending order starting from
- * the most recently started operation.
+ * The long-running operation metadata field type `metadata.type_url` describes the type of the
+ * metadata. Operations returned include those that have completed/failed/canceled within the last
+ * 7 days, and pending operations. Operations returned are ordered by
+ * `operation.metadata.value.start_time` in descending order starting from the most recently
+ * started operation.
*
* Authorization requires `spanner.instancePartitionOperations.list` permission on the resource
* [parent][google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequest.parent].
@@ -4509,14 +4483,14 @@ public final ListInstancePartitionOperationsPagedResponse listInstancePartitionO
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Lists instance partition [long-running operations][google.longrunning.Operation] in the given
- * instance. An instance partition operation has a name of the form
+ * Lists instance partition long-running operations in the given instance. An instance partition
+ * operation has a name of the form
* `projects/<project>/instances/<instance>/instancePartitions/<instance_partition>/operations/<operation>`.
- * The long-running operation [metadata][google.longrunning.Operation.metadata] field type
- * `metadata.type_url` describes the type of the metadata. Operations returned include those that
- * have completed/failed/canceled within the last 7 days, and pending operations. Operations
- * returned are ordered by `operation.metadata.value.start_time` in descending order starting from
- * the most recently started operation.
+ * The long-running operation metadata field type `metadata.type_url` describes the type of the
+ * metadata. Operations returned include those that have completed/failed/canceled within the last
+ * 7 days, and pending operations. Operations returned are ordered by
+ * `operation.metadata.value.start_time` in descending order starting from the most recently
+ * started operation.
*
* Authorization requires `spanner.instancePartitionOperations.list` permission on the resource
* [parent][google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequest.parent].
@@ -4551,14 +4525,14 @@ public final ListInstancePartitionOperationsPagedResponse listInstancePartitionO
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Lists instance partition [long-running operations][google.longrunning.Operation] in the given
- * instance. An instance partition operation has a name of the form
+ * Lists instance partition long-running operations in the given instance. An instance partition
+ * operation has a name of the form
* `projects/<project>/instances/<instance>/instancePartitions/<instance_partition>/operations/<operation>`.
- * The long-running operation [metadata][google.longrunning.Operation.metadata] field type
- * `metadata.type_url` describes the type of the metadata. Operations returned include those that
- * have completed/failed/canceled within the last 7 days, and pending operations. Operations
- * returned are ordered by `operation.metadata.value.start_time` in descending order starting from
- * the most recently started operation.
+ * The long-running operation metadata field type `metadata.type_url` describes the type of the
+ * metadata. Operations returned include those that have completed/failed/canceled within the last
+ * 7 days, and pending operations. Operations returned are ordered by
+ * `operation.metadata.value.start_time` in descending order starting from the most recently
+ * started operation.
*
* Authorization requires `spanner.instancePartitionOperations.list` permission on the resource
* [parent][google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequest.parent].
@@ -4597,14 +4571,14 @@ public final ListInstancePartitionOperationsPagedResponse listInstancePartitionO
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Lists instance partition [long-running operations][google.longrunning.Operation] in the given
- * instance. An instance partition operation has a name of the form
+ * Lists instance partition long-running operations in the given instance. An instance partition
+ * operation has a name of the form
* `projects/<project>/instances/<instance>/instancePartitions/<instance_partition>/operations/<operation>`.
- * The long-running operation [metadata][google.longrunning.Operation.metadata] field type
- * `metadata.type_url` describes the type of the metadata. Operations returned include those that
- * have completed/failed/canceled within the last 7 days, and pending operations. Operations
- * returned are ordered by `operation.metadata.value.start_time` in descending order starting from
- * the most recently started operation.
+ * The long-running operation metadata field type `metadata.type_url` describes the type of the
+ * metadata. Operations returned include those that have completed/failed/canceled within the last
+ * 7 days, and pending operations. Operations returned are ordered by
+ * `operation.metadata.value.start_time` in descending order starting from the most recently
+ * started operation.
*
* Authorization requires `spanner.instancePartitionOperations.list` permission on the resource
* [parent][google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequest.parent].
@@ -4643,14 +4617,14 @@ public final ListInstancePartitionOperationsPagedResponse listInstancePartitionO
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Lists instance partition [long-running operations][google.longrunning.Operation] in the given
- * instance. An instance partition operation has a name of the form
+ * Lists instance partition long-running operations in the given instance. An instance partition
+ * operation has a name of the form
* `projects/<project>/instances/<instance>/instancePartitions/<instance_partition>/operations/<operation>`.
- * The long-running operation [metadata][google.longrunning.Operation.metadata] field type
- * `metadata.type_url` describes the type of the metadata. Operations returned include those that
- * have completed/failed/canceled within the last 7 days, and pending operations. Operations
- * returned are ordered by `operation.metadata.value.start_time` in descending order starting from
- * the most recently started operation.
+ * The long-running operation metadata field type `metadata.type_url` describes the type of the
+ * metadata. Operations returned include those that have completed/failed/canceled within the last
+ * 7 days, and pending operations. Operations returned are ordered by
+ * `operation.metadata.value.start_time` in descending order starting from the most recently
+ * started operation.
*
* Authorization requires `spanner.instancePartitionOperations.list` permission on the resource
* [parent][google.spanner.admin.instance.v1.ListInstancePartitionOperationsRequest.parent].
@@ -4696,8 +4670,8 @@ public final ListInstancePartitionOperationsPagedResponse listInstancePartitionO
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Moves an instance to the target instance configuration. You can use the returned [long-running
- * operation][google.longrunning.Operation] to track the progress of moving the instance.
+ * Moves an instance to the target instance configuration. You can use the returned long-running
+ * operation to track the progress of moving the instance.
*
* `MoveInstance` returns `FAILED_PRECONDITION` if the instance meets any of the following
* criteria:
@@ -4718,13 +4692,12 @@ public final ListInstancePartitionOperationsPagedResponse listInstancePartitionO
* storage charges. * The instance might experience higher read-write latencies and a higher
* transaction abort rate. However, moving an instance doesn't cause any downtime.
*
- * The returned [long-running operation][google.longrunning.Operation] has a name of the format
+ * The returned long-running operation has a name of the format
* `<instance_name>/operations/<operation_id>` and can be used to track the move
- * instance operation. The [metadata][google.longrunning.Operation.metadata] field type is
- * [MoveInstanceMetadata][google.spanner.admin.instance.v1.MoveInstanceMetadata]. The
- * [response][google.longrunning.Operation.response] field type is
- * [Instance][google.spanner.admin.instance.v1.Instance], if successful. Cancelling the operation
- * sets its metadata's
+ * instance operation. The metadata field type is
+ * [MoveInstanceMetadata][google.spanner.admin.instance.v1.MoveInstanceMetadata]. The response
+ * field type is [Instance][google.spanner.admin.instance.v1.Instance], if successful. Cancelling
+ * the operation sets its metadata's
* [cancel_time][google.spanner.admin.instance.v1.MoveInstanceMetadata.cancel_time]. Cancellation
* is not immediate because it involves moving any data previously moved to the target instance
* configuration back to the original instance configuration. You can use this operation to track
@@ -4770,8 +4743,8 @@ public final OperationFuture moveIns
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Moves an instance to the target instance configuration. You can use the returned [long-running
- * operation][google.longrunning.Operation] to track the progress of moving the instance.
+ * Moves an instance to the target instance configuration. You can use the returned long-running
+ * operation to track the progress of moving the instance.
*
* `MoveInstance` returns `FAILED_PRECONDITION` if the instance meets any of the following
* criteria:
@@ -4792,13 +4765,12 @@ public final OperationFuture moveIns
* storage charges. * The instance might experience higher read-write latencies and a higher
* transaction abort rate. However, moving an instance doesn't cause any downtime.
*
- * The returned [long-running operation][google.longrunning.Operation] has a name of the format
+ * The returned long-running operation has a name of the format
* `<instance_name>/operations/<operation_id>` and can be used to track the move
- * instance operation. The [metadata][google.longrunning.Operation.metadata] field type is
- * [MoveInstanceMetadata][google.spanner.admin.instance.v1.MoveInstanceMetadata]. The
- * [response][google.longrunning.Operation.response] field type is
- * [Instance][google.spanner.admin.instance.v1.Instance], if successful. Cancelling the operation
- * sets its metadata's
+ * instance operation. The metadata field type is
+ * [MoveInstanceMetadata][google.spanner.admin.instance.v1.MoveInstanceMetadata]. The response
+ * field type is [Instance][google.spanner.admin.instance.v1.Instance], if successful. Cancelling
+ * the operation sets its metadata's
* [cancel_time][google.spanner.admin.instance.v1.MoveInstanceMetadata.cancel_time]. Cancellation
* is not immediate because it involves moving any data previously moved to the target instance
* configuration back to the original instance configuration. You can use this operation to track
@@ -4844,8 +4816,8 @@ public final OperationFuture moveIns
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
- * Moves an instance to the target instance configuration. You can use the returned [long-running
- * operation][google.longrunning.Operation] to track the progress of moving the instance.
+ * Moves an instance to the target instance configuration. You can use the returned long-running
+ * operation to track the progress of moving the instance.
*
* `MoveInstance` returns `FAILED_PRECONDITION` if the instance meets any of the following
* criteria:
@@ -4866,13 +4838,12 @@ public final OperationFuture moveIns
* storage charges. * The instance might experience higher read-write latencies and a higher
* transaction abort rate. However, moving an instance doesn't cause any downtime.
*
- * The returned [long-running operation][google.longrunning.Operation] has a name of the format
+ * The returned long-running operation has a name of the format
* `<instance_name>/operations/<operation_id>` and can be used to track the move
- * instance operation. The [metadata][google.longrunning.Operation.metadata] field type is
- * [MoveInstanceMetadata][google.spanner.admin.instance.v1.MoveInstanceMetadata]. The
- * [response][google.longrunning.Operation.response] field type is
- * [Instance][google.spanner.admin.instance.v1.Instance], if successful. Cancelling the operation
- * sets its metadata's
+ * instance operation. The metadata field type is
+ * [MoveInstanceMetadata][google.spanner.admin.instance.v1.MoveInstanceMetadata]. The response
+ * field type is [Instance][google.spanner.admin.instance.v1.Instance], if successful. Cancelling
+ * the operation sets its metadata's
* [cancel_time][google.spanner.admin.instance.v1.MoveInstanceMetadata.cancel_time]. Cancellation
* is not immediate because it involves moving any data previously moved to the target instance
* configuration back to the original instance configuration. You can use this operation to track
diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/AbstractBaseUnitOfWork.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/AbstractBaseUnitOfWork.java
index 58143523b65..f04026429f5 100644
--- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/AbstractBaseUnitOfWork.java
+++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/AbstractBaseUnitOfWork.java
@@ -368,7 +368,7 @@ public ApiCallContext configure(
if (statementTimeout.hasTimeout()
&& applyStatementTimeoutToMethods.contains(method)) {
return GrpcCallContext.createDefault()
- .withTimeout(statementTimeout.asDuration());
+ .withTimeoutDuration(statementTimeout.asDuration());
}
return null;
}
diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/ClientSideStatementSetExecutor.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/ClientSideStatementSetExecutor.java
index 413905116ff..38c7c364106 100644
--- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/ClientSideStatementSetExecutor.java
+++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/ClientSideStatementSetExecutor.java
@@ -16,13 +16,18 @@
package com.google.cloud.spanner.connection;
+import com.google.cloud.Tuple;
import com.google.cloud.spanner.ErrorCode;
import com.google.cloud.spanner.SpannerExceptionFactory;
import com.google.cloud.spanner.connection.AbstractStatementParser.ParsedStatement;
import com.google.cloud.spanner.connection.ClientSideStatementImpl.CompileException;
import com.google.common.base.Preconditions;
+import com.google.common.cache.Cache;
+import com.google.common.cache.CacheBuilder;
+import com.google.common.util.concurrent.UncheckedExecutionException;
import java.lang.reflect.Constructor;
import java.lang.reflect.Method;
+import java.util.concurrent.ExecutionException;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -31,8 +36,10 @@
* AUTOCOMMIT=TRUE.
*/
class ClientSideStatementSetExecutor implements ClientSideStatementExecutor {
+ private final Cache> cache;
private final ClientSideStatementImpl statement;
private final Method method;
+ private final boolean supportsLocal;
private final ClientSideStatementValueConverter converter;
private final Pattern allowedValuesPattern;
@@ -46,12 +53,18 @@ class ClientSideStatementSetExecutor implements ClientSideStatementExecutor {
@SuppressWarnings("unchecked")
ClientSideStatementSetExecutor(ClientSideStatementImpl statement) throws CompileException {
Preconditions.checkNotNull(statement.getSetStatement());
+ this.cache =
+ CacheBuilder.newBuilder()
+ .maximumSize(25)
+ // Set the concurrency level to 1, as we don't expect many concurrent updates.
+ .concurrencyLevel(1)
+ .build();
try {
this.statement = statement;
this.allowedValuesPattern =
Pattern.compile(
String.format(
- "(?is)\\A\\s*set\\s+%s\\s*%s\\s*%s\\s*\\z",
+ "(?is)\\A\\s*set\\s+((?:local|session)\\s+)?%s\\s*%s\\s*%s\\s*\\z",
statement.getSetStatement().getPropertyName(),
statement.getSetStatement().getSeparator(),
statement.getSetStatement().getAllowedValues()));
@@ -64,9 +77,21 @@ class ClientSideStatementSetExecutor implements ClientSideStatementExecutor {
Constructor> constructor =
converterClass.getConstructor(String.class);
this.converter = constructor.newInstance(statement.getSetStatement().getAllowedValues());
- this.method =
- ConnectionStatementExecutor.class.getDeclaredMethod(
- statement.getMethodName(), converter.getParameterClass());
+ Method method;
+ boolean supportsLocal;
+ try {
+ method =
+ ConnectionStatementExecutor.class.getDeclaredMethod(
+ statement.getMethodName(), converter.getParameterClass());
+ supportsLocal = false;
+ } catch (NoSuchMethodException ignore) {
+ method =
+ ConnectionStatementExecutor.class.getDeclaredMethod(
+ statement.getMethodName(), converter.getParameterClass(), Boolean.class);
+ supportsLocal = true;
+ }
+ this.method = method;
+ this.supportsLocal = supportsLocal;
} catch (Exception e) {
throw new CompileException(e, statement);
}
@@ -75,17 +100,29 @@ class ClientSideStatementSetExecutor implements ClientSideStatementExecutor {
@Override
public StatementResult execute(ConnectionStatementExecutor connection, ParsedStatement statement)
throws Exception {
- return (StatementResult)
- method.invoke(connection, getParameterValue(statement.getSqlWithoutComments()));
+ Tuple value;
+ try {
+ value =
+ this.cache.get(
+ statement.getSqlWithoutComments(),
+ () -> getParameterValue(statement.getSqlWithoutComments()));
+ } catch (ExecutionException | UncheckedExecutionException executionException) {
+ throw SpannerExceptionFactory.asSpannerException(executionException.getCause());
+ }
+ if (this.supportsLocal) {
+ return (StatementResult) method.invoke(connection, value.x(), value.y());
+ }
+ return (StatementResult) method.invoke(connection, value.x());
}
- T getParameterValue(String sql) {
+ Tuple getParameterValue(String sql) {
Matcher matcher = allowedValuesPattern.matcher(sql);
- if (matcher.find() && matcher.groupCount() >= 1) {
- String value = matcher.group(1);
+ if (matcher.find() && matcher.groupCount() >= 2) {
+ boolean local = matcher.group(1) != null && "local".equalsIgnoreCase(matcher.group(1).trim());
+ String value = matcher.group(2);
T res = converter.convert(value);
if (res != null) {
- return res;
+ return Tuple.of(res, local);
}
throw SpannerExceptionFactory.newSpannerException(
ErrorCode.INVALID_ARGUMENT,
@@ -94,8 +131,9 @@ T getParameterValue(String sql) {
this.statement.getSetStatement().getPropertyName(), value));
} else {
Matcher invalidMatcher = this.statement.getPattern().matcher(sql);
- if (invalidMatcher.find() && invalidMatcher.groupCount() == 1) {
- String invalidValue = invalidMatcher.group(1);
+ int valueGroup = this.supportsLocal ? 2 : 1;
+ if (invalidMatcher.find() && invalidMatcher.groupCount() == valueGroup) {
+ String invalidValue = invalidMatcher.group(valueGroup);
throw SpannerExceptionFactory.newSpannerException(
ErrorCode.INVALID_ARGUMENT,
String.format(
diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/ConnectionImpl.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/ConnectionImpl.java
index 0b2d0b6b3a0..2d7c917d230 100644
--- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/ConnectionImpl.java
+++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/ConnectionImpl.java
@@ -76,6 +76,7 @@
import com.google.cloud.spanner.connection.AbstractStatementParser.StatementType;
import com.google.cloud.spanner.connection.ConnectionProperty.Context;
import com.google.cloud.spanner.connection.ConnectionState.Type;
+import com.google.cloud.spanner.connection.StatementExecutor.StatementExecutorType;
import com.google.cloud.spanner.connection.StatementExecutor.StatementTimeout;
import com.google.cloud.spanner.connection.StatementResult.ResultType;
import com.google.cloud.spanner.connection.UnitOfWork.CallType;
@@ -94,9 +95,10 @@
import io.opentelemetry.api.trace.Span;
import io.opentelemetry.api.trace.Tracer;
import java.io.File;
-import java.io.FileInputStream;
import java.io.InputStream;
+import java.nio.file.Files;
import java.time.Duration;
+import java.time.Instant;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
@@ -108,13 +110,11 @@
import java.util.UUID;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.RejectedExecutionException;
-import java.util.concurrent.ThreadFactory;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
import java.util.stream.Collectors;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
-import org.threeten.bp.Instant;
/** Implementation for {@link Connection}, the generic Spanner connection API (not JDBC). */
class ConnectionImpl implements Connection {
@@ -130,9 +130,6 @@ class ConnectionImpl implements Connection {
"This method may only be called while in autocommit mode";
private static final String NOT_ALLOWED_IN_AUTOCOMMIT =
"This method may not be called while in autocommit mode";
-
- private static final ParsedStatement BEGIN_STATEMENT =
- AbstractStatementParser.getInstance(Dialect.GOOGLE_STANDARD_SQL).parse(Statement.of("BEGIN"));
private static final ParsedStatement COMMIT_STATEMENT =
AbstractStatementParser.getInstance(Dialect.GOOGLE_STANDARD_SQL)
.parse(Statement.of("COMMIT"));
@@ -145,9 +142,6 @@ class ConnectionImpl implements Connection {
private static final ParsedStatement START_BATCH_DML_STATEMENT =
AbstractStatementParser.getInstance(Dialect.GOOGLE_STANDARD_SQL)
.parse(Statement.of("START BATCH DML"));
- private static final ParsedStatement RUN_BATCH_STATEMENT =
- AbstractStatementParser.getInstance(Dialect.GOOGLE_STANDARD_SQL)
- .parse(Statement.of("RUN BATCH"));
// These SAVEPOINT statements are used as sentinels to recognize the start/rollback/release of a
// savepoint.
@@ -185,17 +179,6 @@ private LeakedConnectionException() {
private final ConnectionStatementExecutor connectionStatementExecutor =
new ConnectionStatementExecutorImpl(this);
- /** Simple thread factory that is used for fire-and-forget rollbacks. */
- static final class DaemonThreadFactory implements ThreadFactory {
- @Override
- public Thread newThread(Runnable r) {
- Thread t = new Thread(r);
- t.setName("connection-rollback-executor");
- t.setDaemon(true);
- return t;
- }
- }
-
/**
* Statements are executed using a separate thread in order to be able to cancel these. Statements
* are automatically cancelled if the configured {@link ConnectionImpl#statementTimeout} is
@@ -302,9 +285,17 @@ static UnitOfWorkType of(TransactionMode transactionMode) {
Preconditions.checkNotNull(options);
this.leakedException =
options.isTrackConnectionLeaks() ? new LeakedConnectionException() : null;
+ StatementExecutorType statementExecutorType;
+ if (options.getStatementExecutorType() != null) {
+ statementExecutorType = options.getStatementExecutorType();
+ } else {
+ statementExecutorType =
+ options.isUseVirtualThreads()
+ ? StatementExecutorType.VIRTUAL_THREAD
+ : StatementExecutorType.PLATFORM_THREAD;
+ }
this.statementExecutor =
- new StatementExecutor(
- options.isUseVirtualThreads(), options.getStatementExecutionInterceptors());
+ new StatementExecutor(statementExecutorType, options.getStatementExecutionInterceptors());
this.spannerPool = SpannerPool.INSTANCE;
this.options = options;
this.spanner = spannerPool.getSpanner(options, this);
@@ -348,7 +339,11 @@ && getDialect() == Dialect.POSTGRESQL
this.leakedException =
options.isTrackConnectionLeaks() ? new LeakedConnectionException() : null;
this.statementExecutor =
- new StatementExecutor(options.isUseVirtualThreads(), Collections.emptyList());
+ new StatementExecutor(
+ options.isUseVirtualThreads()
+ ? StatementExecutorType.VIRTUAL_THREAD
+ : StatementExecutorType.PLATFORM_THREAD,
+ Collections.emptyList());
this.spannerPool = Preconditions.checkNotNull(spannerPool);
this.options = Preconditions.checkNotNull(options);
this.spanner = spannerPool.getSpanner(options, this);
@@ -507,11 +502,6 @@ UnitOfWorkType getUnitOfWorkType() {
return unitOfWorkType;
}
- /** Get the current batch mode of this connection. */
- BatchMode getBatchMode() {
- return batchMode;
- }
-
/** @return true if this connection is in a batch. */
boolean isInBatch() {
return batchMode != BatchMode.NONE;
@@ -900,7 +890,7 @@ public byte[] getProtoDescriptors() {
String.format(
"File %s is not a valid proto descriptors file", this.protoDescriptorsFilePath));
}
- InputStream pdStream = new FileInputStream(protoDescriptorsFile);
+ InputStream pdStream = Files.newInputStream(protoDescriptorsFile.toPath());
this.protoDescriptors = ByteArray.copyFrom(pdStream).toByteArray();
} catch (Exception exception) {
throw SpannerExceptionFactory.newSpannerException(exception);
@@ -952,8 +942,12 @@ public boolean isRetryAbortsInternally() {
@Override
public void setRetryAbortsInternally(boolean retryAbortsInternally) {
+ setRetryAbortsInternally(retryAbortsInternally, /* local = */ false);
+ }
+
+ void setRetryAbortsInternally(boolean retryAbortsInternally, boolean local) {
checkSetRetryAbortsInternallyAvailable();
- setConnectionPropertyValue(RETRY_ABORTS_INTERNALLY, retryAbortsInternally);
+ setConnectionPropertyValue(RETRY_ABORTS_INTERNALLY, retryAbortsInternally, local);
}
@Override
@@ -1420,7 +1414,7 @@ public ResultSet executeQuery(Statement query, QueryOption... options) {
@Override
public AsyncResultSet executeQueryAsync(Statement query, QueryOption... options) {
- return parseAndExecuteQueryAsync(CallType.ASYNC, query, AnalyzeMode.NONE, options);
+ return parseAndExecuteQueryAsync(query, options);
}
@Override
@@ -1620,8 +1614,7 @@ private ResultSet parseAndExecuteQuery(
+ parsedStatement.getSqlWithoutComments());
}
- private AsyncResultSet parseAndExecuteQueryAsync(
- CallType callType, Statement query, AnalyzeMode analyzeMode, QueryOption... options) {
+ private AsyncResultSet parseAndExecuteQueryAsync(Statement query, QueryOption... options) {
Preconditions.checkNotNull(query);
ConnectionPreconditions.checkState(!isClosed(), CLOSED_ERROR_MSG);
ParsedStatement parsedStatement = getStatementParser().parse(query, buildQueryOptions());
@@ -1636,7 +1629,8 @@ private AsyncResultSet parseAndExecuteQueryAsync(
spanner.getAsyncExecutorProvider(),
options);
case QUERY:
- return internalExecuteQueryAsync(callType, parsedStatement, analyzeMode, options);
+ return internalExecuteQueryAsync(
+ CallType.ASYNC, parsedStatement, AnalyzeMode.NONE, options);
case UPDATE:
if (parsedStatement.hasReturningClause()) {
// Cannot execute DML statement with returning clause in read-only mode or in
@@ -1649,7 +1643,8 @@ private AsyncResultSet parseAndExecuteQueryAsync(
"DML statement with returning clause cannot be executed in read-only mode: "
+ parsedStatement.getSqlWithoutComments());
}
- return internalExecuteQueryAsync(callType, parsedStatement, analyzeMode, options);
+ return internalExecuteQueryAsync(
+ CallType.ASYNC, parsedStatement, AnalyzeMode.NONE, options);
}
case DDL:
case UNKNOWN:
diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/ConnectionOptions.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/ConnectionOptions.java
index 66b09c35afd..6e991816ab6 100644
--- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/ConnectionOptions.java
+++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/ConnectionOptions.java
@@ -70,6 +70,7 @@
import com.google.cloud.spanner.SpannerException;
import com.google.cloud.spanner.SpannerExceptionFactory;
import com.google.cloud.spanner.SpannerOptions;
+import com.google.cloud.spanner.connection.StatementExecutor.StatementExecutorType;
import com.google.common.annotations.VisibleForTesting;
import com.google.common.base.Preconditions;
import com.google.common.base.Strings;
@@ -614,6 +615,7 @@ public static class Builder {
new HashMap<>();
private String uri;
private Credentials credentials;
+ private StatementExecutorType statementExecutorType;
private SessionPoolOptions sessionPoolOptions;
private List statementExecutionInterceptors =
Collections.emptyList();
@@ -626,11 +628,16 @@ private Builder() {}
public static final String SPANNER_URI_FORMAT =
"(?:cloudspanner:)(?//[\\w.-]+(?:\\.[\\w\\.-]+)*[\\w\\-\\._~:/?#\\[\\]@!\\$&'\\(\\)\\*\\+,;=.]+)?/projects/(?(([a-z]|[-.:]|[0-9])+|(DEFAULT_PROJECT_ID)))(/instances/(?([a-z]|[-]|[0-9])+)(/databases/(?([a-z]|[-]|[_]|[0-9])+))?)?(?:[?|;].*)?";
+ public static final String EXTERNAL_HOST_FORMAT =
+ "(?:cloudspanner:)(?//[\\w.-]+(?::\\d+)?)(/instances/(?[a-z0-9-]+))?(/databases/(?[a-z0-9_-]+))(?:[?;].*)?";
private static final String SPANNER_URI_REGEX = "(?is)^" + SPANNER_URI_FORMAT + "$";
@VisibleForTesting
static final Pattern SPANNER_URI_PATTERN = Pattern.compile(SPANNER_URI_REGEX);
+ @VisibleForTesting
+ static final Pattern EXTERNAL_HOST_PATTERN = Pattern.compile(EXTERNAL_HOST_FORMAT);
+
private static final String HOST_GROUP = "HOSTGROUP";
private static final String PROJECT_GROUP = "PROJECTGROUP";
private static final String INSTANCE_GROUP = "INSTANCEGROUP";
@@ -641,6 +648,10 @@ private boolean isValidUri(String uri) {
return SPANNER_URI_PATTERN.matcher(uri).matches();
}
+ private boolean isValidExternalHostUri(String uri) {
+ return EXTERNAL_HOST_PATTERN.matcher(uri).matches();
+ }
+
/**
* Sets the URI of the Cloud Spanner database to connect to. A connection URI must be specified
* in this format:
@@ -698,9 +709,11 @@ private boolean isValidUri(String uri) {
* @return this builder
*/
public Builder setUri(String uri) {
- Preconditions.checkArgument(
- isValidUri(uri),
- "The specified URI is not a valid Cloud Spanner connection URI. Please specify a URI in the format \"cloudspanner:[//host[:port]]/projects/project-id[/instances/instance-id[/databases/database-name]][\\?property-name=property-value[;property-name=property-value]*]?\"");
+ if (!isValidExternalHostUri(uri)) {
+ Preconditions.checkArgument(
+ isValidUri(uri),
+ "The specified URI is not a valid Cloud Spanner connection URI. Please specify a URI in the format \"cloudspanner:[//host[:port]]/projects/project-id[/instances/instance-id[/databases/database-name]][\\?property-name=property-value[;property-name=property-value]*]?\"");
+ }
ConnectionPropertyValue value =
cast(ConnectionProperties.parseValues(uri).get(LENIENT.getKey()));
checkValidProperties(value != null && value.getValue(), uri);
@@ -777,6 +790,11 @@ Builder setCredentials(Credentials credentials) {
return this;
}
+ Builder setStatementExecutorType(StatementExecutorType statementExecutorType) {
+ this.statementExecutorType = statementExecutorType;
+ return this;
+ }
+
public Builder setOpenTelemetry(OpenTelemetry openTelemetry) {
this.openTelemetry = openTelemetry;
return this;
@@ -814,6 +832,7 @@ public static Builder newBuilder() {
private final String instanceId;
private final String databaseName;
private final Credentials credentials;
+ private final StatementExecutorType statementExecutorType;
private final SessionPoolOptions sessionPoolOptions;
private final OpenTelemetry openTelemetry;
@@ -821,7 +840,14 @@ public static Builder newBuilder() {
private final SpannerOptionsConfigurator configurator;
private ConnectionOptions(Builder builder) {
- Matcher matcher = Builder.SPANNER_URI_PATTERN.matcher(builder.uri);
+ Matcher matcher;
+ boolean isExternalHost = false;
+ if (builder.isValidExternalHostUri(builder.uri)) {
+ matcher = Builder.EXTERNAL_HOST_PATTERN.matcher(builder.uri);
+ isExternalHost = true;
+ } else {
+ matcher = Builder.SPANNER_URI_PATTERN.matcher(builder.uri);
+ }
Preconditions.checkArgument(
matcher.find(), String.format("Invalid connection URI specified: %s", builder.uri));
@@ -834,6 +860,7 @@ private ConnectionOptions(Builder builder) {
ConnectionPropertyValue value = cast(connectionPropertyValues.get(LENIENT.getKey()));
this.warnings = checkValidProperties(value != null && value.getValue(), uri);
this.fixedCredentials = builder.credentials;
+ this.statementExecutorType = builder.statementExecutorType;
this.openTelemetry = builder.openTelemetry;
this.statementExecutionInterceptors =
@@ -938,12 +965,18 @@ && getInitialConnectionPropertyValue(OAUTH_TOKEN) == null
this.sessionPoolOptions = SessionPoolOptions.newBuilder().setAutoDetectDialect(true).build();
}
- String projectId = matcher.group(Builder.PROJECT_GROUP);
+ String projectId = "default";
+ String instanceId = matcher.group(Builder.INSTANCE_GROUP);
+ if (!isExternalHost) {
+ projectId = matcher.group(Builder.PROJECT_GROUP);
+ } else if (instanceId == null) {
+ instanceId = "default";
+ }
if (Builder.DEFAULT_PROJECT_ID_PLACEHOLDER.equalsIgnoreCase(projectId)) {
projectId = getDefaultProjectId(this.credentials);
}
this.projectId = projectId;
- this.instanceId = matcher.group(Builder.INSTANCE_GROUP);
+ this.instanceId = instanceId;
this.databaseName = matcher.group(Builder.DATABASE_GROUP);
}
@@ -972,6 +1005,10 @@ static String determineHost(
// The leading '//' is already included in the regex for the connection URL, so we don't need
// to add the leading '//' to the host name here.
host = matcher.group(Builder.HOST_GROUP);
+ if (Builder.EXTERNAL_HOST_FORMAT.equals(matcher.pattern().pattern())
+ && !host.matches(".*:\\d+$")) {
+ host = String.format("%s:15000", host);
+ }
}
if (usePlainText) {
return PLAIN_TEXT_PROTOCOL + host;
@@ -1105,6 +1142,10 @@ CredentialsProvider getCredentialsProvider() {
return getInitialConnectionPropertyValue(CREDENTIALS_PROVIDER);
}
+ StatementExecutorType getStatementExecutorType() {
+ return this.statementExecutorType;
+ }
+
/** The {@link SessionPoolOptions} of this {@link ConnectionOptions}. */
public SessionPoolOptions getSessionPoolOptions() {
return sessionPoolOptions;
diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/ConnectionProperties.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/ConnectionProperties.java
index 0ca9b7256e2..fd40efa8f4a 100644
--- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/ConnectionProperties.java
+++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/ConnectionProperties.java
@@ -112,20 +112,22 @@
import com.google.cloud.spanner.connection.ClientSideStatementValueConverters.StringValueConverter;
import com.google.cloud.spanner.connection.ConnectionProperty.Context;
import com.google.cloud.spanner.connection.DirectedReadOptionsUtil.DirectedReadOptionsConverter;
+import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import com.google.spanner.v1.DirectedReadOptions;
import java.time.Duration;
-import java.util.Map;
/**
* Utility class that defines all known connection properties. This class will eventually replace
* the list of {@link com.google.cloud.spanner.connection.ConnectionOptions.ConnectionProperty} in
* {@link ConnectionOptions}.
*/
-class ConnectionProperties {
+public class ConnectionProperties {
private static final ImmutableMap.Builder>
CONNECTION_PROPERTIES_BUILDER = ImmutableMap.builder();
+ private static final Boolean[] BOOLEANS = new Boolean[] {Boolean.TRUE, Boolean.FALSE};
+
static final ConnectionProperty CONNECTION_STATE_TYPE =
create(
"connection_state_type",
@@ -133,6 +135,7 @@ class ConnectionProperties {
+ "If no value is set, then the database dialect default will be used, "
+ "which is NON_TRANSACTIONAL for GoogleSQL and TRANSACTIONAL for PostgreSQL.",
null,
+ ConnectionState.Type.values(),
ConnectionStateTypeConverter.INSTANCE,
Context.STARTUP);
static final ConnectionProperty TRACING_PREFIX =
@@ -148,6 +151,7 @@ class ConnectionProperties {
LENIENT_PROPERTY_NAME,
"Silently ignore unknown properties in the connection string/properties (true/false)",
DEFAULT_LENIENT,
+ BOOLEANS,
BooleanConverter.INSTANCE,
Context.STARTUP);
static final ConnectionProperty ENDPOINT =
@@ -167,6 +171,7 @@ class ConnectionProperties {
+ "The instance and database in the connection string will automatically be created if these do not yet exist on the emulator. "
+ "Add dialect=postgresql to the connection string to make sure that the database that is created uses the PostgreSQL dialect.",
false,
+ BOOLEANS,
BooleanConverter.INSTANCE,
Context.STARTUP);
static final ConnectionProperty USE_AUTO_SAVEPOINTS_FOR_EMULATOR =
@@ -175,6 +180,7 @@ class ConnectionProperties {
"Automatically creates savepoints for each statement in a read/write transaction when using the Emulator. "
+ "This is no longer needed when using Emulator version 1.5.23 or higher.",
false,
+ BOOLEANS,
BooleanConverter.INSTANCE,
Context.STARTUP);
static final ConnectionProperty USE_PLAIN_TEXT =
@@ -182,6 +188,7 @@ class ConnectionProperties {
USE_PLAIN_TEXT_PROPERTY_NAME,
"Use a plain text communication channel (i.e. non-TLS) for communicating with the server (true/false). Set this value to true for communication with the Cloud Spanner emulator.",
DEFAULT_USE_PLAIN_TEXT,
+ BOOLEANS,
BooleanConverter.INSTANCE,
Context.STARTUP);
@@ -226,6 +233,7 @@ class ConnectionProperties {
DIALECT_PROPERTY_NAME,
"Sets the dialect to use for new databases that are created by this connection.",
Dialect.GOOGLE_STANDARD_SQL,
+ Dialect.values(),
DialectConverter.INSTANCE,
Context.STARTUP);
static final ConnectionProperty TRACK_SESSION_LEAKS =
@@ -238,6 +246,7 @@ class ConnectionProperties {
+ "actual session leak is detected. The stack trace of the exception will "
+ "in that case not contain the call stack of when the session was checked out.",
DEFAULT_TRACK_SESSION_LEAKS,
+ BOOLEANS,
BooleanConverter.INSTANCE,
Context.STARTUP);
static final ConnectionProperty TRACK_CONNECTION_LEAKS =
@@ -250,6 +259,7 @@ class ConnectionProperties {
+ "actual connection leak is detected. The stack trace of the exception will "
+ "in that case not contain the call stack of when the connection was created.",
DEFAULT_TRACK_CONNECTION_LEAKS,
+ BOOLEANS,
BooleanConverter.INSTANCE,
Context.STARTUP);
static final ConnectionProperty ROUTE_TO_LEADER =
@@ -257,6 +267,7 @@ class ConnectionProperties {
ROUTE_TO_LEADER_PROPERTY_NAME,
"Should read/write transactions and partitioned DML be routed to leader region (true/false)",
DEFAULT_ROUTE_TO_LEADER,
+ BOOLEANS,
BooleanConverter.INSTANCE,
Context.STARTUP);
static final ConnectionProperty USE_VIRTUAL_THREADS =
@@ -265,6 +276,7 @@ class ConnectionProperties {
"Use a virtual thread instead of a platform thread for each connection (true/false). "
+ "This option only has any effect if the application is running on Java 21 or higher. In all other cases, the option is ignored.",
DEFAULT_USE_VIRTUAL_THREADS,
+ BOOLEANS,
BooleanConverter.INSTANCE,
Context.STARTUP);
static final ConnectionProperty USE_VIRTUAL_GRPC_TRANSPORT_THREADS =
@@ -273,6 +285,7 @@ class ConnectionProperties {
"Use a virtual thread instead of a platform thread for the gRPC executor (true/false). "
+ "This option only has any effect if the application is running on Java 21 or higher. In all other cases, the option is ignored.",
DEFAULT_USE_VIRTUAL_GRPC_TRANSPORT_THREADS,
+ BOOLEANS,
BooleanConverter.INSTANCE,
Context.STARTUP);
static final ConnectionProperty ENABLE_EXTENDED_TRACING =
@@ -282,6 +295,7 @@ class ConnectionProperties {
+ "by this connection. The SQL string is added as the standard OpenTelemetry "
+ "attribute 'db.statement'.",
DEFAULT_ENABLE_EXTENDED_TRACING,
+ BOOLEANS,
BooleanConverter.INSTANCE,
Context.STARTUP);
static final ConnectionProperty ENABLE_API_TRACING =
@@ -292,6 +306,7 @@ class ConnectionProperties {
+ "or if you want to debug potential latency problems caused by RPCs that are "
+ "being retried.",
DEFAULT_ENABLE_API_TRACING,
+ BOOLEANS,
BooleanConverter.INSTANCE,
Context.STARTUP);
static final ConnectionProperty ENABLE_END_TO_END_TRACING =
@@ -302,6 +317,7 @@ class ConnectionProperties {
+ "Server side traces can only go to Google Cloud Trace, so to see end to end traces, "
+ "the application should configure an exporter that exports the traces to Google Cloud Trace.",
DEFAULT_ENABLE_END_TO_END_TRACING,
+ BOOLEANS,
BooleanConverter.INSTANCE,
Context.STARTUP);
static final ConnectionProperty MIN_SESSIONS =
@@ -345,6 +361,7 @@ class ConnectionProperties {
AUTOCOMMIT_PROPERTY_NAME,
"Should the connection start in autocommit (true/false)",
DEFAULT_AUTOCOMMIT,
+ BOOLEANS,
BooleanConverter.INSTANCE,
Context.USER);
static final ConnectionProperty READONLY =
@@ -352,13 +369,16 @@ class ConnectionProperties {
READONLY_PROPERTY_NAME,
"Should the connection start in read-only mode (true/false)",
DEFAULT_READONLY,
+ BOOLEANS,
BooleanConverter.INSTANCE,
Context.USER);
static final ConnectionProperty AUTOCOMMIT_DML_MODE =
create(
"autocommit_dml_mode",
- "Should the connection automatically retry Aborted errors (true/false)",
+ "Determines the transaction type that is used to execute "
+ + "DML statements when the connection is in auto-commit mode.",
AutocommitDmlMode.TRANSACTIONAL,
+ AutocommitDmlMode.values(),
AutocommitDmlModeConverter.INSTANCE,
Context.USER);
static final ConnectionProperty RETRY_ABORTS_INTERNALLY =
@@ -371,6 +391,7 @@ class ConnectionProperties {
RETRY_ABORTS_INTERNALLY_PROPERTY_NAME,
"Should the connection automatically retry Aborted errors (true/false)",
DEFAULT_RETRY_ABORTS_INTERNALLY,
+ BOOLEANS,
BooleanConverter.INSTANCE,
Context.USER);
static final ConnectionProperty RETURN_COMMIT_STATS =
@@ -378,6 +399,7 @@ class ConnectionProperties {
"returnCommitStats",
"Request that Spanner returns commit statistics for read/write transactions (true/false)",
DEFAULT_RETURN_COMMIT_STATS,
+ BOOLEANS,
BooleanConverter.INSTANCE,
Context.USER);
static final ConnectionProperty DELAY_TRANSACTION_START_UNTIL_FIRST_WRITE =
@@ -389,6 +411,7 @@ class ConnectionProperties {
+ "the first write operation in a read/write transaction will be executed using the read/write transaction. Enabling this mode can reduce locking "
+ "and improve performance for applications that can handle the lower transaction isolation semantics.",
DEFAULT_DELAY_TRANSACTION_START_UNTIL_FIRST_WRITE,
+ BOOLEANS,
BooleanConverter.INSTANCE,
Context.USER);
static final ConnectionProperty KEEP_TRANSACTION_ALIVE =
@@ -398,6 +421,7 @@ class ConnectionProperties {
+ "if no other statements are being executed. This option should be used with caution, as it can keep transactions alive and hold on to locks "
+ "longer than intended. This option should typically be used for CLI-type application that might wait for user input for a longer period of time.",
DEFAULT_KEEP_TRANSACTION_ALIVE,
+ BOOLEANS,
BooleanConverter.INSTANCE,
Context.USER);
@@ -415,6 +439,7 @@ class ConnectionProperties {
+ "Executing a query that cannot be partitioned will fail. "
+ "Executing a query in a read/write transaction will also fail.",
DEFAULT_AUTO_PARTITION_MODE,
+ BOOLEANS,
BooleanConverter.INSTANCE,
Context.USER);
static final ConnectionProperty DATA_BOOST_ENABLED =
@@ -423,6 +448,7 @@ class ConnectionProperties {
"Enable data boost for all partitioned queries that are executed by this connection. "
+ "This setting is only used for partitioned queries and is ignored by all other statements.",
DEFAULT_DATA_BOOST_ENABLED,
+ BOOLEANS,
BooleanConverter.INSTANCE,
Context.USER);
static final ConnectionProperty MAX_PARTITIONS =
@@ -468,6 +494,7 @@ class ConnectionProperties {
RPC_PRIORITY_NAME,
"Sets the priority for all RPC invocations from this connection (HIGH/MEDIUM/LOW). The default is HIGH.",
DEFAULT_RPC_PRIORITY,
+ RpcPriority.values(),
RpcPriorityConverter.INSTANCE,
Context.USER);
static final ConnectionProperty SAVEPOINT_SUPPORT =
@@ -475,6 +502,7 @@ class ConnectionProperties {
"savepoint_support",
"Determines the behavior of the connection when savepoints are used.",
SavepointSupport.FAIL_AFTER_ROLLBACK,
+ SavepointSupport.values(),
SavepointSupportConverter.INSTANCE,
Context.USER);
static final ConnectionProperty DDL_IN_TRANSACTION_MODE =
@@ -482,6 +510,7 @@ class ConnectionProperties {
DDL_IN_TRANSACTION_MODE_PROPERTY_NAME,
"Determines how the connection should handle DDL statements in a read/write transaction.",
DEFAULT_DDL_IN_TRANSACTION_MODE,
+ DdlInTransactionMode.values(),
DdlInTransactionModeConverter.INSTANCE,
Context.USER);
static final ConnectionProperty MAX_COMMIT_DELAY =
@@ -504,6 +533,7 @@ class ConnectionProperties {
+ "This setting is only in read/write transactions. DML statements in auto-commit mode "
+ "are executed directly.",
DEFAULT_AUTO_BATCH_DML,
+ BOOLEANS,
BooleanConverter.INSTANCE,
Context.USER);
static final ConnectionProperty AUTO_BATCH_DML_UPDATE_COUNT =
@@ -538,12 +568,17 @@ class ConnectionProperties {
+ AUTO_BATCH_DML_UPDATE_COUNT_VERIFICATION_PROPERTY_NAME
+ " to false.",
DEFAULT_AUTO_BATCH_DML_UPDATE_COUNT_VERIFICATION,
+ BOOLEANS,
BooleanConverter.INSTANCE,
Context.USER);
- static final Map> CONNECTION_PROPERTIES =
+ static final ImmutableMap> CONNECTION_PROPERTIES =
CONNECTION_PROPERTIES_BUILDER.build();
+ /** The list of all supported connection properties. */
+ public static ImmutableList> VALID_CONNECTION_PROPERTIES =
+ ImmutableList.copyOf(ConnectionProperties.CONNECTION_PROPERTIES.values());
+
/** Utility method for creating a new core {@link ConnectionProperty}. */
private static ConnectionProperty create(
String name,
@@ -551,10 +586,27 @@ private static ConnectionProperty create(
T defaultValue,
ClientSideStatementValueConverter converter,
Context context) {
- ConnectionProperty property =
- ConnectionProperty.create(name, description, defaultValue, converter, context);
- CONNECTION_PROPERTIES_BUILDER.put(property.getKey(), property);
- return property;
+ return create(name, description, defaultValue, null, converter, context);
+ }
+
+ /** Utility method for creating a new core {@link ConnectionProperty}. */
+ private static ConnectionProperty create(
+ String name,
+ String description,
+ T defaultValue,
+ T[] validValues,
+ ClientSideStatementValueConverter converter,
+ Context context) {
+ try {
+ ConnectionProperty property =
+ ConnectionProperty.create(
+ name, description, defaultValue, validValues, converter, context);
+ CONNECTION_PROPERTIES_BUILDER.put(property.getKey(), property);
+ return property;
+ } catch (Throwable t) {
+ t.printStackTrace();
+ }
+ return null;
}
/** Parse the connection properties that can be found in the given connection URL. */
diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/ConnectionProperty.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/ConnectionProperty.java
index c203d44203b..7c06774cf2f 100644
--- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/ConnectionProperty.java
+++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/ConnectionProperty.java
@@ -37,12 +37,13 @@
* connection state is an opt-in.
*/
public class ConnectionProperty {
+
/**
* Context indicates when a {@link ConnectionProperty} may be set. Each higher-ordinal value
* includes the preceding values, meaning that a {@link ConnectionProperty} with {@link
* Context#USER} can be set both at connection startup and during the connection's lifetime.
*/
- enum Context {
+ public enum Context {
/** The property can only be set at startup of the connection. */
STARTUP,
/**
@@ -79,8 +80,20 @@ static ConnectionProperty create(
T defaultValue,
ClientSideStatementValueConverter converter,
Context context) {
+ return create(name, description, defaultValue, null, converter, context);
+ }
+
+ /** Utility method for creating a typed {@link ConnectionProperty}. */
+ @Nonnull
+ static ConnectionProperty create(
+ @Nonnull String name,
+ String description,
+ T defaultValue,
+ T[] validValues,
+ ClientSideStatementValueConverter converter,
+ Context context) {
return new ConnectionProperty<>(
- null, name, description, defaultValue, null, converter, context);
+ null, name, description, defaultValue, validValues, converter, context);
}
/**
@@ -163,35 +176,38 @@ ConnectionPropertyValue convert(@Nullable String stringValue) {
return new ConnectionPropertyValue<>(this, convertedValue, convertedValue);
}
- String getKey() {
+ @Nonnull
+ public String getKey() {
return this.key;
}
- boolean hasExtension() {
+ public boolean hasExtension() {
return this.extension != null;
}
- String getExtension() {
+ public String getExtension() {
return this.extension;
}
- String getName() {
+ @Nonnull
+ public String getName() {
return this.name;
}
- String getDescription() {
+ @Nonnull
+ public String getDescription() {
return this.description;
}
- T getDefaultValue() {
+ public T getDefaultValue() {
return this.defaultValue;
}
- T[] getValidValues() {
+ public T[] getValidValues() {
return this.validValues;
}
- Context getContext() {
+ public Context getContext() {
return this.context;
}
}
diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/ConnectionStatementExecutor.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/ConnectionStatementExecutor.java
index 48f79118fee..458f117242e 100644
--- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/ConnectionStatementExecutor.java
+++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/ConnectionStatementExecutor.java
@@ -44,7 +44,7 @@ interface ConnectionStatementExecutor {
StatementResult statementShowReadOnly();
- StatementResult statementSetRetryAbortsInternally(Boolean retryAbortsInternally);
+ StatementResult statementSetRetryAbortsInternally(Boolean retryAbortsInternally, Boolean local);
StatementResult statementShowRetryAbortsInternally();
diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/ConnectionStatementExecutorImpl.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/ConnectionStatementExecutorImpl.java
index 9b28ee7503b..a321c6a5cbc 100644
--- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/ConnectionStatementExecutorImpl.java
+++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/ConnectionStatementExecutorImpl.java
@@ -181,9 +181,10 @@ public StatementResult statementShowReadOnly() {
}
@Override
- public StatementResult statementSetRetryAbortsInternally(Boolean retryAbortsInternally) {
+ public StatementResult statementSetRetryAbortsInternally(
+ Boolean retryAbortsInternally, Boolean local) {
Preconditions.checkNotNull(retryAbortsInternally);
- getConnection().setRetryAbortsInternally(retryAbortsInternally);
+ getConnection().setRetryAbortsInternally(retryAbortsInternally, local);
return noResult(SET_RETRY_ABORTS_INTERNALLY);
}
diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/LocalConnectionChecker.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/LocalConnectionChecker.java
index 4271a8c2f0b..f9a12f5552a 100644
--- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/LocalConnectionChecker.java
+++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/LocalConnectionChecker.java
@@ -24,7 +24,7 @@
import com.google.cloud.spanner.admin.instance.v1.stub.GrpcInstanceAdminStub;
import com.google.cloud.spanner.admin.instance.v1.stub.InstanceAdminStubSettings;
import com.google.spanner.admin.instance.v1.ListInstanceConfigsRequest;
-import org.threeten.bp.Duration;
+import java.time.Duration;
/**
* Util class for quickly checking whether a local emulator or test server can be found. A common
@@ -66,7 +66,7 @@ void checkLocalConnection(ConnectionOptions options) {
.build());
testEmulatorSettings
.listInstanceConfigsSettings()
- .setSimpleTimeoutNoRetries(Duration.ofSeconds(10L));
+ .setSimpleTimeoutNoRetriesDuration(Duration.ofSeconds(10L));
try (GrpcInstanceAdminStub stub =
GrpcInstanceAdminStub.create(testEmulatorSettings.build())) {
stub.listInstanceConfigsCallable()
diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/StatementExecutor.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/StatementExecutor.java
index a126bd8ff37..7340834a926 100644
--- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/StatementExecutor.java
+++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/StatementExecutor.java
@@ -29,6 +29,7 @@
import com.google.common.util.concurrent.MoreExecutors;
import com.google.protobuf.Duration;
import io.opentelemetry.context.Context;
+import java.time.temporal.ChronoUnit;
import java.util.Collections;
import java.util.List;
import java.util.concurrent.Callable;
@@ -37,7 +38,6 @@
import java.util.concurrent.ThreadFactory;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
-import org.threeten.bp.temporal.ChronoUnit;
/**
* {@link StatementExecutor} is responsible for executing statements on a {@link Connection}.
@@ -106,26 +106,26 @@ public boolean hasDuration() {
});
}
- org.threeten.bp.Duration asDuration() {
+ java.time.Duration asDuration() {
if (!hasTimeout()) {
- return org.threeten.bp.Duration.ZERO;
+ return java.time.Duration.ZERO;
}
TimeUnit unit = getAppropriateTimeUnit();
switch (unit) {
case DAYS:
- return org.threeten.bp.Duration.ofDays(getTimeoutValue(unit));
+ return java.time.Duration.ofDays(getTimeoutValue(unit));
case HOURS:
- return org.threeten.bp.Duration.ofHours(getTimeoutValue(unit));
+ return java.time.Duration.ofHours(getTimeoutValue(unit));
case MICROSECONDS:
- return org.threeten.bp.Duration.of(getTimeoutValue(unit), ChronoUnit.MICROS);
+ return java.time.Duration.of(getTimeoutValue(unit), ChronoUnit.MICROS);
case MILLISECONDS:
- return org.threeten.bp.Duration.ofMillis(getTimeoutValue(unit));
+ return java.time.Duration.ofMillis(getTimeoutValue(unit));
case MINUTES:
- return org.threeten.bp.Duration.ofMinutes(getTimeoutValue(unit));
+ return java.time.Duration.ofMinutes(getTimeoutValue(unit));
case NANOSECONDS:
- return org.threeten.bp.Duration.ofNanos(getTimeoutValue(unit));
+ return java.time.Duration.ofNanos(getTimeoutValue(unit));
case SECONDS:
- return org.threeten.bp.Duration.ofSeconds(getTimeoutValue(unit));
+ return java.time.Duration.ofSeconds(getTimeoutValue(unit));
default:
throw new IllegalStateException("invalid time unit: " + unit);
}
@@ -146,7 +146,10 @@ org.threeten.bp.Duration asDuration() {
ThreadFactoryUtil.createVirtualOrPlatformDaemonThreadFactory("connection-executor", false);
/** Creates an {@link ExecutorService} for a {@link StatementExecutor}. */
- private static ListeningExecutorService createExecutorService(boolean useVirtualThreads) {
+ private static ListeningExecutorService createExecutorService(StatementExecutorType type) {
+ if (type == StatementExecutorType.DIRECT_EXECUTOR) {
+ return MoreExecutors.newDirectExecutorService();
+ }
return MoreExecutors.listeningDecorator(
Context.taskWrapping(
new ThreadPoolExecutor(
@@ -155,7 +158,7 @@ private static ListeningExecutorService createExecutorService(boolean useVirtual
0L,
TimeUnit.MILLISECONDS,
new LinkedBlockingQueue<>(),
- useVirtualThreads
+ type == StatementExecutorType.VIRTUAL_THREAD
? DEFAULT_VIRTUAL_THREAD_FACTORY
: DEFAULT_DAEMON_THREAD_FACTORY)));
}
@@ -168,13 +171,23 @@ private static ListeningExecutorService createExecutorService(boolean useVirtual
*/
private final List interceptors;
+ enum StatementExecutorType {
+ PLATFORM_THREAD,
+ VIRTUAL_THREAD,
+ DIRECT_EXECUTOR,
+ }
+
@VisibleForTesting
StatementExecutor() {
- this(DEFAULT_USE_VIRTUAL_THREADS, Collections.emptyList());
+ this(
+ DEFAULT_USE_VIRTUAL_THREADS
+ ? StatementExecutorType.VIRTUAL_THREAD
+ : StatementExecutorType.PLATFORM_THREAD,
+ Collections.emptyList());
}
- StatementExecutor(boolean useVirtualThreads, List interceptors) {
- this.executor = createExecutorService(useVirtualThreads);
+ StatementExecutor(StatementExecutorType type, List interceptors) {
+ this.executor = createExecutorService(type);
this.interceptors = Collections.unmodifiableList(interceptors);
}
diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/spi/v1/GapicSpannerRpc.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/spi/v1/GapicSpannerRpc.java
index fe23b097982..0e540ea7926 100644
--- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/spi/v1/GapicSpannerRpc.java
+++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/spi/v1/GapicSpannerRpc.java
@@ -192,6 +192,7 @@
import java.net.URLDecoder;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
+import java.time.Duration;
import java.util.Comparator;
import java.util.HashMap;
import java.util.List;
@@ -214,7 +215,6 @@
import java.util.stream.Collectors;
import java.util.stream.Stream;
import javax.annotation.Nullable;
-import org.threeten.bp.Duration;
/** Implementation of Cloud Spanner remote calls using Gapic libraries. */
@InternalApi
@@ -347,7 +347,7 @@ public GapicSpannerRpc(final SpannerOptions options) {
// Set a keepalive time of 120 seconds to help long running
// commit GRPC calls succeed
- .setKeepAliveTime(Duration.ofSeconds(GRPC_KEEPALIVE_SECONDS))
+ .setKeepAliveTimeDuration(Duration.ofSeconds(GRPC_KEEPALIVE_SECONDS))
// Then check if SpannerOptions provides an InterceptorProvider. Create a default
// SpannerInterceptorProvider if none is provided
@@ -396,7 +396,7 @@ public GapicSpannerRpc(final SpannerOptions options) {
WatchdogProvider watchdogProvider =
InstantiatingWatchdogProvider.create()
.withExecutor(spannerWatchdog)
- .withCheckInterval(checkInterval)
+ .withCheckIntervalDuration(checkInterval)
.withClock(NanoClock.getDefaultClock());
final String emulatorHost = System.getenv("SPANNER_EMULATOR_HOST");
@@ -652,7 +652,7 @@ private static void checkEmulatorConnection(
.setCredentialsProvider(credentialsProvider);
testEmulatorSettings
.listInstanceConfigsSettings()
- .setSimpleTimeoutNoRetries(Duration.ofSeconds(10L));
+ .setSimpleTimeoutNoRetriesDuration(Duration.ofSeconds(10L));
try (GrpcInstanceAdminStub stub =
GrpcInstanceAdminStub.create(testEmulatorSettings.build())) {
stub.listInstanceConfigsCallable()
@@ -685,9 +685,9 @@ private static boolean isEmulatorEnabled(SpannerOptions options, String emulator
private static final RetrySettings ADMIN_REQUESTS_LIMIT_EXCEEDED_RETRY_SETTINGS =
RetrySettings.newBuilder()
- .setInitialRetryDelay(Duration.ofSeconds(5L))
+ .setInitialRetryDelayDuration(Duration.ofSeconds(5L))
.setRetryDelayMultiplier(2.0)
- .setMaxRetryDelay(Duration.ofSeconds(60L))
+ .setMaxRetryDelayDuration(Duration.ofSeconds(60L))
.setMaxAttempts(10)
.build();
@@ -1770,7 +1770,7 @@ public ServerStream executeStreamingPartitionedDml(
SpannerGrpc.getExecuteStreamingSqlMethod(),
true);
// Override any timeout settings that might have been set on the call context.
- context = context.withTimeout(timeout).withStreamWaitTimeout(timeout);
+ context = context.withTimeoutDuration(timeout).withStreamWaitTimeoutDuration(timeout);
return partitionedDmlStub.executeStreamingSqlCallable().call(request, context);
}
@@ -2037,7 +2037,10 @@ GrpcCallContext newCallContext(
context.withCallOptions(context.getCallOptions().withCallCredentials(callCredentials));
}
}
- context = context.withStreamWaitTimeout(waitTimeout).withStreamIdleTimeout(idleTimeout);
+ context =
+ context
+ .withStreamWaitTimeoutDuration(waitTimeout)
+ .withStreamIdleTimeoutDuration(idleTimeout);
CallContextConfigurator configurator = SpannerOptions.CALL_CONTEXT_CONFIGURATOR_KEY.get();
ApiCallContext apiCallContextFromContext = null;
if (configurator != null) {
diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/spi/v1/SpannerErrorInterceptor.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/spi/v1/SpannerErrorInterceptor.java
index 65db088ffac..549ea18a97f 100644
--- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/spi/v1/SpannerErrorInterceptor.java
+++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/spi/v1/SpannerErrorInterceptor.java
@@ -16,6 +16,7 @@
package com.google.cloud.spanner.spi.v1;
+import com.google.cloud.spanner.IsRetryableInternalError;
import com.google.rpc.BadRequest;
import com.google.rpc.Help;
import com.google.rpc.LocalizedMessage;
@@ -32,6 +33,7 @@
import io.grpc.Metadata;
import io.grpc.MethodDescriptor;
import io.grpc.Status;
+import io.grpc.Status.Code;
import io.grpc.protobuf.ProtoUtils;
import java.util.logging.Level;
import java.util.logging.Logger;
@@ -69,6 +71,11 @@ public void start(Listener responseListener, Metadata headers) {
@Override
public void onClose(Status status, Metadata trailers) {
try {
+ // Translate INTERNAL errors that should be retried to a retryable error code.
+ if (IsRetryableInternalError.INSTANCE.isRetryableInternalError(status)) {
+ status =
+ Status.fromCode(Code.UNAVAILABLE).withDescription(status.getDescription());
+ }
if (trailers.containsKey(LOCALIZED_MESSAGE_KEY)) {
status =
Status.fromCodeValue(status.getCode().value())
diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/spi/v1/SpannerRpc.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/spi/v1/SpannerRpc.java
index 0b040df4197..9ad94204743 100644
--- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/spi/v1/SpannerRpc.java
+++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/spi/v1/SpannerRpc.java
@@ -56,11 +56,11 @@
import com.google.spanner.admin.instance.v1.UpdateInstanceConfigMetadata;
import com.google.spanner.admin.instance.v1.UpdateInstanceMetadata;
import com.google.spanner.v1.*;
+import java.time.Duration;
import java.util.List;
import java.util.Map;
import java.util.Set;
import javax.annotation.Nullable;
-import org.threeten.bp.Duration;
/**
* Abstracts remote calls to the Cloud Spanner service. Typically end-consumer code will never use
diff --git a/google-cloud-spanner/src/main/resources/META-INF/native-image/com.google.cloud.spanner.admin.instance.v1/reflect-config.json b/google-cloud-spanner/src/main/resources/META-INF/native-image/com.google.cloud.spanner.admin.instance.v1/reflect-config.json
index 1a2d3dd10d9..65363fdf447 100644
--- a/google-cloud-spanner/src/main/resources/META-INF/native-image/com.google.cloud.spanner.admin.instance.v1/reflect-config.json
+++ b/google-cloud-spanner/src/main/resources/META-INF/native-image/com.google.cloud.spanner.admin.instance.v1/reflect-config.json
@@ -1889,6 +1889,33 @@
"allDeclaredClasses": true,
"allPublicClasses": true
},
+ {
+ "name": "com.google.spanner.admin.instance.v1.FreeInstanceMetadata",
+ "queryAllDeclaredConstructors": true,
+ "queryAllPublicConstructors": true,
+ "queryAllDeclaredMethods": true,
+ "allPublicMethods": true,
+ "allDeclaredClasses": true,
+ "allPublicClasses": true
+ },
+ {
+ "name": "com.google.spanner.admin.instance.v1.FreeInstanceMetadata$Builder",
+ "queryAllDeclaredConstructors": true,
+ "queryAllPublicConstructors": true,
+ "queryAllDeclaredMethods": true,
+ "allPublicMethods": true,
+ "allDeclaredClasses": true,
+ "allPublicClasses": true
+ },
+ {
+ "name": "com.google.spanner.admin.instance.v1.FreeInstanceMetadata$ExpireBehavior",
+ "queryAllDeclaredConstructors": true,
+ "queryAllPublicConstructors": true,
+ "queryAllDeclaredMethods": true,
+ "allPublicMethods": true,
+ "allDeclaredClasses": true,
+ "allPublicClasses": true
+ },
{
"name": "com.google.spanner.admin.instance.v1.FulfillmentPeriod",
"queryAllDeclaredConstructors": true,
@@ -1988,6 +2015,15 @@
"allDeclaredClasses": true,
"allPublicClasses": true
},
+ {
+ "name": "com.google.spanner.admin.instance.v1.Instance$InstanceType",
+ "queryAllDeclaredConstructors": true,
+ "queryAllPublicConstructors": true,
+ "queryAllDeclaredMethods": true,
+ "allPublicMethods": true,
+ "allDeclaredClasses": true,
+ "allPublicClasses": true
+ },
{
"name": "com.google.spanner.admin.instance.v1.Instance$State",
"queryAllDeclaredConstructors": true,
@@ -2015,6 +2051,24 @@
"allDeclaredClasses": true,
"allPublicClasses": true
},
+ {
+ "name": "com.google.spanner.admin.instance.v1.InstanceConfig$FreeInstanceAvailability",
+ "queryAllDeclaredConstructors": true,
+ "queryAllPublicConstructors": true,
+ "queryAllDeclaredMethods": true,
+ "allPublicMethods": true,
+ "allDeclaredClasses": true,
+ "allPublicClasses": true
+ },
+ {
+ "name": "com.google.spanner.admin.instance.v1.InstanceConfig$QuorumType",
+ "queryAllDeclaredConstructors": true,
+ "queryAllPublicConstructors": true,
+ "queryAllDeclaredMethods": true,
+ "allPublicMethods": true,
+ "allDeclaredClasses": true,
+ "allPublicClasses": true
+ },
{
"name": "com.google.spanner.admin.instance.v1.InstanceConfig$State",
"queryAllDeclaredConstructors": true,
diff --git a/google-cloud-spanner/src/main/resources/com/google/cloud/spanner/connection/ClientSideStatements.json b/google-cloud-spanner/src/main/resources/com/google/cloud/spanner/connection/ClientSideStatements.json
index 31e8d4efd1d..7998d50c2b8 100644
--- a/google-cloud-spanner/src/main/resources/com/google/cloud/spanner/connection/ClientSideStatements.json
+++ b/google-cloud-spanner/src/main/resources/com/google/cloud/spanner/connection/ClientSideStatements.json
@@ -355,13 +355,18 @@
}
},
{
- "name": "SET RETRY_ABORTS_INTERNALLY = TRUE|FALSE",
+ "name": "SET [LOCAL] RETRY_ABORTS_INTERNALLY = TRUE|FALSE",
"executorName": "ClientSideStatementSetExecutor",
"resultType": "NO_RESULT",
"statementType": "SET_RETRY_ABORTS_INTERNALLY",
- "regex": "(?is)\\A\\s*set\\s+retry_aborts_internally\\s*(?:=)\\s*(.*)\\z",
+ "regex": "(?is)\\A\\s*set\\s+(local\\s+)?retry_aborts_internally\\s*(?:=)\\s*(.*)\\z",
"method": "statementSetRetryAbortsInternally",
- "exampleStatements": ["set retry_aborts_internally = true", "set retry_aborts_internally = false"],
+ "exampleStatements": [
+ "set retry_aborts_internally = true",
+ "set retry_aborts_internally = false",
+ "set local retry_aborts_internally = true",
+ "set local retry_aborts_internally = false"
+ ],
"examplePrerequisiteStatements": ["set readonly = false", "set autocommit = false"],
"setStatement": {
"propertyName": "RETRY_ABORTS_INTERNALLY",
diff --git a/google-cloud-spanner/src/main/resources/com/google/cloud/spanner/connection/PG_ClientSideStatements.json b/google-cloud-spanner/src/main/resources/com/google/cloud/spanner/connection/PG_ClientSideStatements.json
index 969487142e1..1c9dea19597 100644
--- a/google-cloud-spanner/src/main/resources/com/google/cloud/spanner/connection/PG_ClientSideStatements.json
+++ b/google-cloud-spanner/src/main/resources/com/google/cloud/spanner/connection/PG_ClientSideStatements.json
@@ -404,13 +404,26 @@
}
},
{
- "name": "SET SPANNER.RETRY_ABORTS_INTERNALLY =|TO TRUE|FALSE",
+ "name": "SET [SESSION|LOCAL] SPANNER.RETRY_ABORTS_INTERNALLY =|TO TRUE|FALSE",
"executorName": "ClientSideStatementSetExecutor",
"resultType": "NO_RESULT",
"statementType": "SET_RETRY_ABORTS_INTERNALLY",
- "regex": "(?is)\\A\\s*set\\s+spanner\\.retry_aborts_internally(?:\\s*=\\s*|\\s+to\\s+)(.*)\\z",
+ "regex": "(?is)\\A\\s*set\\s+((?:session|local)\\s+)?spanner\\.retry_aborts_internally(?:\\s*=\\s*|\\s+to\\s+)(.*)\\z",
"method": "statementSetRetryAbortsInternally",
- "exampleStatements": ["set spanner.retry_aborts_internally = true", "set spanner.retry_aborts_internally = false", "set spanner.retry_aborts_internally to true", "set spanner.retry_aborts_internally to false"],
+ "exampleStatements": [
+ "set spanner.retry_aborts_internally = true",
+ "set spanner.retry_aborts_internally = false",
+ "set spanner.retry_aborts_internally to true",
+ "set spanner.retry_aborts_internally to false",
+ "set local spanner.retry_aborts_internally = true",
+ "set local spanner.retry_aborts_internally = false",
+ "set local spanner.retry_aborts_internally to true",
+ "set local spanner.retry_aborts_internally to false",
+ "set session spanner.retry_aborts_internally = true",
+ "set session spanner.retry_aborts_internally = false",
+ "set session spanner.retry_aborts_internally to true",
+ "set session spanner.retry_aborts_internally to false"
+ ],
"examplePrerequisiteStatements": ["set spanner.readonly = false", "set autocommit = false"],
"setStatement": {
"propertyName": "SPANNER.RETRY_ABORTS_INTERNALLY",
diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/BatchClientImplTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/BatchClientImplTest.java
index 8d05df538a5..edafc7ddba9 100644
--- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/BatchClientImplTest.java
+++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/BatchClientImplTest.java
@@ -36,6 +36,7 @@
import com.google.spanner.v1.Session;
import com.google.spanner.v1.Transaction;
import io.opentelemetry.api.OpenTelemetry;
+import java.time.Duration;
import java.util.Collections;
import java.util.Map;
import org.junit.Before;
@@ -56,6 +57,7 @@ public final class BatchClientImplTest {
private static final String SESSION_NAME = DB_NAME + "/sessions/s1";
private static final ByteString TXN_ID = ByteString.copyFromUtf8("my-txn");
private static final String TIMESTAMP = "2017-11-15T10:54:20Z";
+ private static boolean isMultiplexedSession = false;
@Mock private SpannerRpc gapicRpc;
@Mock private SpannerOptions spannerOptions;
@@ -68,6 +70,11 @@ public final class BatchClientImplTest {
public static void setupOpenTelemetry() {
SpannerOptions.resetActiveTracingFramework();
SpannerOptions.enableOpenTelemetryTraces();
+ Boolean useMultiplexedSessionFromEnvVariablePartitionedOps =
+ SessionPoolOptions.getUseMultiplexedSessionFromEnvVariablePartitionedOps();
+ isMultiplexedSession =
+ useMultiplexedSessionFromEnvVariablePartitionedOps != null
+ && useMultiplexedSessionFromEnvVariablePartitionedOps;
}
@SuppressWarnings("unchecked")
@@ -88,18 +95,32 @@ public void setUp() {
when(spannerOptions.getTransportOptions()).thenReturn(transportOptions);
SessionPoolOptions sessionPoolOptions = mock(SessionPoolOptions.class);
when(sessionPoolOptions.getPoolMaintainerClock()).thenReturn(Clock.INSTANCE);
+ when(sessionPoolOptions.getUseMultiplexedSessionPartitionedOps())
+ .thenReturn(isMultiplexedSession);
+ when(sessionPoolOptions.getMultiplexedSessionMaintenanceDuration()).thenReturn(Duration.ZERO);
when(spannerOptions.getSessionPoolOptions()).thenReturn(sessionPoolOptions);
@SuppressWarnings("resource")
SpannerImpl spanner = new SpannerImpl(gapicRpc, spannerOptions);
- client = new BatchClientImpl(spanner.getSessionClient(db));
+ client = new BatchClientImpl(spanner.getSessionClient(db), isMultiplexedSession);
}
@SuppressWarnings("unchecked")
@Test
public void testBatchReadOnlyTxnWithBound() throws Exception {
- Session sessionProto = Session.newBuilder().setName(SESSION_NAME).build();
- when(gapicRpc.createSession(eq(DB_NAME), anyString(), anyMap(), optionsCaptor.capture()))
- .thenReturn(sessionProto);
+ Session sessionProto =
+ Session.newBuilder().setName(SESSION_NAME).setMultiplexed(isMultiplexedSession).build();
+ if (isMultiplexedSession) {
+ when(gapicRpc.createSession(
+ eq(DB_NAME),
+ anyString(),
+ anyMap(),
+ optionsCaptor.capture(),
+ eq(isMultiplexedSession)))
+ .thenReturn(sessionProto);
+ } else {
+ when(gapicRpc.createSession(eq(DB_NAME), anyString(), anyMap(), optionsCaptor.capture()))
+ .thenReturn(sessionProto);
+ }
com.google.protobuf.Timestamp timestamp = Timestamps.parse(TIMESTAMP);
Transaction txnMetadata =
Transaction.newBuilder().setId(TXN_ID).setReadTimestamp(timestamp).build();
diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/BatchCreateSessionsSlowTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/BatchCreateSessionsSlowTest.java
index 4bcc5d07401..72d04d94614 100644
--- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/BatchCreateSessionsSlowTest.java
+++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/BatchCreateSessionsSlowTest.java
@@ -33,6 +33,7 @@
import io.grpc.Server;
import io.grpc.inprocess.InProcessServerBuilder;
import java.io.IOException;
+import java.time.Duration;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.Executors;
@@ -46,7 +47,6 @@
import org.junit.experimental.categories.Category;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
-import org.threeten.bp.Duration;
@Category(SlowTest.class)
@RunWith(JUnit4.class)
@@ -127,7 +127,7 @@ public void testBatchCreateSessionsTimesOut_whenDeadlineExceeded() throws Except
builder
.getSpannerStubSettingsBuilder()
.batchCreateSessionsSettings()
- .setSimpleTimeoutNoRetries(Duration.ofMillis(100));
+ .setSimpleTimeoutNoRetriesDuration(Duration.ofMillis(100));
try (Spanner spanner = builder.build().getService()) {
DatabaseId databaseId = DatabaseId.of("my-project", "my-instance", "my-database");
@@ -168,7 +168,9 @@ public void testBatchCreateSessionsTimesOut_whenResourceExhausted() throws Excep
// Add a timeout for the max amount of time (60ms) that a request waits when a session is
// unavailable.
SessionPoolOptions sessionPoolOptions =
- SessionPoolOptions.newBuilder().setAcquireSessionTimeout(Duration.ofMillis(60)).build();
+ SessionPoolOptions.newBuilder()
+ .setAcquireSessionTimeoutDuration(Duration.ofMillis(60))
+ .build();
SpannerOptions.Builder builder =
SpannerOptions.newBuilder()
.setProjectId("my-project")
@@ -181,7 +183,7 @@ public void testBatchCreateSessionsTimesOut_whenResourceExhausted() throws Excep
builder
.getSpannerStubSettingsBuilder()
.batchCreateSessionsSettings()
- .setSimpleTimeoutNoRetries(Duration.ofMillis(1000));
+ .setSimpleTimeoutNoRetriesDuration(Duration.ofMillis(1000));
try (Spanner spanner = builder.build().getService()) {
DatabaseId databaseId = DatabaseId.of("my-project", "my-instance", "my-database");
@@ -192,7 +194,6 @@ public void testBatchCreateSessionsTimesOut_whenResourceExhausted() throws Excep
List> futures = new ArrayList<>(5000);
AtomicInteger counter = new AtomicInteger();
for (int i = 0; i < 5000; i++) {
- final int index = i;
futures.add(
service.submit(
() -> {
diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/BatchTransactionIdTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/BatchTransactionIdTest.java
index cf431348ce5..81d4de41695 100644
--- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/BatchTransactionIdTest.java
+++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/BatchTransactionIdTest.java
@@ -50,5 +50,8 @@ public void serialization() {
reserializeAndAssert(
new BatchTransactionId(
"testSession", ByteString.copyFromUtf8("testTxn"), Timestamp.MIN_VALUE));
+ reserializeAndAssert(
+ new BatchTransactionId(
+ "testSession", ByteString.copyFromUtf8("testTxn"), Timestamp.MIN_VALUE));
}
}
diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/CloseSpannerWithOpenResultSetTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/CloseSpannerWithOpenResultSetTest.java
index 8d622579714..c8228e5ecf8 100644
--- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/CloseSpannerWithOpenResultSetTest.java
+++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/CloseSpannerWithOpenResultSetTest.java
@@ -30,6 +30,7 @@
import com.google.spanner.v1.ExecuteSqlRequest;
import io.grpc.ManagedChannelBuilder;
import io.grpc.Status;
+import java.time.Duration;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.ExecutorService;
@@ -44,7 +45,6 @@
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
-import org.threeten.bp.Duration;
@RunWith(JUnit4.class)
public class CloseSpannerWithOpenResultSetTest extends AbstractMockServerTest {
@@ -56,7 +56,9 @@ Spanner createSpanner() {
.setChannelConfigurator(ManagedChannelBuilder::usePlaintext)
.setCredentials(NoCredentials.getInstance())
.setSessionPoolOption(
- SessionPoolOptions.newBuilder().setWaitForMinSessions(Duration.ofSeconds(5L)).build())
+ SessionPoolOptions.newBuilder()
+ .setWaitForMinSessionsDuration(Duration.ofSeconds(5L))
+ .build())
.build()
.getService();
}
diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/CompositeTracerTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/CompositeTracerTest.java
index dfb7b252268..7f2e7fffc6f 100644
--- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/CompositeTracerTest.java
+++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/CompositeTracerTest.java
@@ -27,6 +27,7 @@
import com.google.common.collect.ImmutableList;
import com.google.spanner.v1.ReadRequest;
import java.lang.reflect.Method;
+import java.time.Duration;
import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
@@ -40,7 +41,6 @@
import org.mockito.Mock;
import org.mockito.junit.MockitoJUnit;
import org.mockito.junit.MockitoRule;
-import org.threeten.bp.Duration;
@RunWith(JUnit4.class)
public class CompositeTracerTest {
@@ -150,11 +150,11 @@ public void testAttemptCancelled() {
public void testAttemptFailed() {
RuntimeException error = new RuntimeException();
Duration delay = Duration.ofMillis(10);
- compositeTracer.attemptFailed(error, delay);
- verify(child1, times(1)).attemptFailed(error, delay);
- verify(child2, times(1)).attemptFailed(error, delay);
- verify(child3, times(1)).attemptFailed(error, delay);
- verify(child4, times(1)).attemptFailed(error, delay);
+ compositeTracer.attemptFailedDuration(error, delay);
+ verify(child1, times(1)).attemptFailedDuration(error, delay);
+ verify(child2, times(1)).attemptFailedDuration(error, delay);
+ verify(child3, times(1)).attemptFailedDuration(error, delay);
+ verify(child4, times(1)).attemptFailedDuration(error, delay);
}
@Test
diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/DatabaseAdminClientTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/DatabaseAdminClientTest.java
index 8bb644e75ce..e93066f2683 100644
--- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/DatabaseAdminClientTest.java
+++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/DatabaseAdminClientTest.java
@@ -55,6 +55,7 @@
import io.grpc.netty.shaded.io.grpc.netty.NettyServerBuilder;
import io.grpc.protobuf.lite.ProtoLiteUtils;
import java.net.InetSocketAddress;
+import java.time.Duration;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
@@ -68,7 +69,6 @@
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
-import org.threeten.bp.Duration;
@RunWith(JUnit4.class)
public class DatabaseAdminClientTest {
@@ -107,13 +107,13 @@ public static void startStaticServer() throws Exception {
SpannerOptions.Builder builder = SpannerOptions.newBuilder();
RetrySettings longRunningInitialRetrySettings =
RetrySettings.newBuilder()
- .setInitialRpcTimeout(Duration.ofMillis(600L))
- .setMaxRpcTimeout(Duration.ofMillis(6000L))
- .setInitialRetryDelay(Duration.ofMillis(20L))
- .setMaxRetryDelay(Duration.ofMillis(45L))
+ .setInitialRpcTimeoutDuration(Duration.ofMillis(600L))
+ .setMaxRpcTimeoutDuration(Duration.ofMillis(6000L))
+ .setInitialRetryDelayDuration(Duration.ofMillis(20L))
+ .setMaxRetryDelayDuration(Duration.ofMillis(45L))
.setRetryDelayMultiplier(1.5)
.setRpcTimeoutMultiplier(1.5)
- .setTotalTimeout(Duration.ofMinutes(48L))
+ .setTotalTimeoutDuration(Duration.ofMinutes(48L))
.build();
builder
.getDatabaseAdminStubSettingsBuilder()
@@ -128,12 +128,12 @@ public static void startStaticServer() throws Exception {
.setPollingAlgorithm(
OperationTimedPollAlgorithm.create(
RetrySettings.newBuilder()
- .setInitialRpcTimeout(Duration.ofMillis(20L))
- .setInitialRetryDelay(Duration.ofMillis(10L))
- .setMaxRetryDelay(Duration.ofMillis(150L))
- .setMaxRpcTimeout(Duration.ofMillis(150L))
+ .setInitialRpcTimeoutDuration(Duration.ofMillis(20L))
+ .setInitialRetryDelayDuration(Duration.ofMillis(10L))
+ .setMaxRetryDelayDuration(Duration.ofMillis(150L))
+ .setMaxRpcTimeoutDuration(Duration.ofMillis(150L))
.setMaxAttempts(10)
- .setTotalTimeout(Duration.ofMillis(5000L))
+ .setTotalTimeoutDuration(Duration.ofMillis(5000L))
.setRetryDelayMultiplier(1.3)
.setRpcTimeoutMultiplier(1.3)
.build()));
@@ -152,12 +152,12 @@ public static void startStaticServer() throws Exception {
.setPollingAlgorithm(
OperationTimedPollAlgorithm.create(
RetrySettings.newBuilder()
- .setInitialRpcTimeout(Duration.ofMillis(20L))
- .setInitialRetryDelay(Duration.ofMillis(10L))
- .setMaxRetryDelay(Duration.ofMillis(150L))
- .setMaxRpcTimeout(Duration.ofMillis(150L))
+ .setInitialRpcTimeoutDuration(Duration.ofMillis(20L))
+ .setInitialRetryDelayDuration(Duration.ofMillis(10L))
+ .setMaxRetryDelayDuration(Duration.ofMillis(150L))
+ .setMaxRpcTimeoutDuration(Duration.ofMillis(150L))
.setMaxAttempts(10)
- .setTotalTimeout(Duration.ofMillis(5000L))
+ .setTotalTimeoutDuration(Duration.ofMillis(5000L))
.setRetryDelayMultiplier(1.3)
.setRpcTimeoutMultiplier(1.3)
.build()));
@@ -175,19 +175,19 @@ public static void startStaticServer() throws Exception {
.setPollingAlgorithm(
OperationTimedPollAlgorithm.create(
RetrySettings.newBuilder()
- .setInitialRpcTimeout(Duration.ofMillis(20L))
- .setInitialRetryDelay(Duration.ofMillis(10L))
- .setMaxRetryDelay(Duration.ofMillis(150L))
- .setMaxRpcTimeout(Duration.ofMillis(150L))
+ .setInitialRpcTimeoutDuration(Duration.ofMillis(20L))
+ .setInitialRetryDelayDuration(Duration.ofMillis(10L))
+ .setMaxRetryDelayDuration(Duration.ofMillis(150L))
+ .setMaxRpcTimeoutDuration(Duration.ofMillis(150L))
.setMaxAttempts(10)
- .setTotalTimeout(Duration.ofMillis(5000L))
+ .setTotalTimeoutDuration(Duration.ofMillis(5000L))
.setRetryDelayMultiplier(1.3)
.setRpcTimeoutMultiplier(1.3)
.build()));
builder.setRetryAdministrativeRequestsSettings(
SpannerOptions.Builder.DEFAULT_ADMIN_REQUESTS_LIMIT_EXCEEDED_RETRY_SETTINGS
.toBuilder()
- .setInitialRetryDelay(Duration.ofNanos(1L))
+ .setInitialRetryDelayDuration(Duration.ofNanos(1L))
.build());
spanner =
builder
diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/DatabaseAdminGaxTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/DatabaseAdminGaxTest.java
index 0af51744abd..be9f07d7f79 100644
--- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/DatabaseAdminGaxTest.java
+++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/DatabaseAdminGaxTest.java
@@ -37,6 +37,7 @@
import io.grpc.StatusRuntimeException;
import io.grpc.inprocess.InProcessServerBuilder;
import java.io.IOException;
+import java.time.Duration;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
@@ -56,7 +57,6 @@
import org.junit.runners.Parameterized;
import org.junit.runners.Parameterized.Parameter;
import org.junit.runners.Parameterized.Parameters;
-import org.threeten.bp.Duration;
@RunWith(Parameterized.class)
public class DatabaseAdminGaxTest {
@@ -214,22 +214,22 @@ public void setUp() throws Exception {
mockDatabaseAdmin.reset();
RetrySettings retrySettingsWithLowTimeout =
RetrySettings.newBuilder()
- .setInitialRetryDelay(Duration.ofMillis(1L))
- .setMaxRetryDelay(Duration.ofMillis(1L))
- .setInitialRpcTimeout(Duration.ofMillis(20L))
- .setMaxRpcTimeout(Duration.ofMillis(1000L))
+ .setInitialRetryDelayDuration(Duration.ofMillis(1L))
+ .setMaxRetryDelayDuration(Duration.ofMillis(1L))
+ .setInitialRpcTimeoutDuration(Duration.ofMillis(20L))
+ .setMaxRpcTimeoutDuration(Duration.ofMillis(1000L))
.setRetryDelayMultiplier(2.0)
.setMaxAttempts(10)
- .setTotalTimeout(Duration.ofMillis(200L))
+ .setTotalTimeoutDuration(Duration.ofMillis(200L))
.build();
RetrySettings retrySettingsWithHighTimeout =
RetrySettings.newBuilder()
- .setInitialRetryDelay(Duration.ofMillis(1L))
- .setMaxRetryDelay(Duration.ofMillis(1L))
- .setInitialRpcTimeout(Duration.ofMillis(2000L))
- .setMaxRpcTimeout(Duration.ofMillis(5000L))
+ .setInitialRetryDelayDuration(Duration.ofMillis(1L))
+ .setMaxRetryDelayDuration(Duration.ofMillis(1L))
+ .setInitialRpcTimeoutDuration(Duration.ofMillis(2000L))
+ .setMaxRpcTimeoutDuration(Duration.ofMillis(5000L))
.setMaxAttempts(3)
- .setTotalTimeout(Duration.ofMillis(15000L))
+ .setTotalTimeoutDuration(Duration.ofMillis(15000L))
.build();
final RetrySettings retrySettingsToUse =
exceptionType == ExceptionType.DELAYED
diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/DatabaseClientImplTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/DatabaseClientImplTest.java
index 62a10c0adb4..86d0bfc2c94 100644
--- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/DatabaseClientImplTest.java
+++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/DatabaseClientImplTest.java
@@ -111,6 +111,8 @@
import io.opentelemetry.api.OpenTelemetry;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
+import java.time.Duration;
+import java.time.Instant;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Base64;
@@ -135,8 +137,6 @@
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
-import org.threeten.bp.Duration;
-import org.threeten.bp.Instant;
@RunWith(JUnit4.class)
public class DatabaseClientImplTest {
@@ -2852,10 +2852,10 @@ public void testPartitionedDmlDoesNotTimeout() {
mockSpanner.setExecuteSqlExecutionTime(SimulatedExecutionTime.ofMinimumAndRandomTime(20, 0));
final RetrySettings retrySettings =
RetrySettings.newBuilder()
- .setInitialRpcTimeout(Duration.ofMillis(1L))
- .setMaxRpcTimeout(Duration.ofMillis(1L))
+ .setInitialRpcTimeoutDuration(Duration.ofMillis(1L))
+ .setMaxRpcTimeoutDuration(Duration.ofMillis(1L))
.setMaxAttempts(1)
- .setTotalTimeout(Duration.ofMillis(1L))
+ .setTotalTimeoutDuration(Duration.ofMillis(1L))
.build();
SpannerOptions.Builder builder =
SpannerOptions.newBuilder()
@@ -2868,7 +2868,8 @@ public void testPartitionedDmlDoesNotTimeout() {
DatabaseClient client =
spanner.getDatabaseClient(DatabaseId.of(TEST_PROJECT, TEST_INSTANCE, TEST_DATABASE));
- assertThat(spanner.getOptions().getPartitionedDmlTimeout()).isEqualTo(Duration.ofHours(2L));
+ assertThat(spanner.getOptions().getPartitionedDmlTimeoutDuration())
+ .isEqualTo(Duration.ofHours(2L));
// PDML should not timeout with these settings.
long updateCount = client.executePartitionedUpdate(UPDATE_STATEMENT);
@@ -2900,11 +2901,12 @@ public void testPartitionedDmlWithLowerTimeout() {
.setChannelProvider(channelProvider)
.setCredentials(NoCredentials.getInstance());
// Set PDML timeout value.
- builder.setPartitionedDmlTimeout(Duration.ofMillis(10L));
+ builder.setPartitionedDmlTimeoutDuration(Duration.ofMillis(10L));
try (Spanner spanner = builder.build().getService()) {
DatabaseClient client =
spanner.getDatabaseClient(DatabaseId.of(TEST_PROJECT, TEST_INSTANCE, TEST_DATABASE));
- assertThat(spanner.getOptions().getPartitionedDmlTimeout()).isEqualTo(Duration.ofMillis(10L));
+ assertThat(spanner.getOptions().getPartitionedDmlTimeoutDuration())
+ .isEqualTo(Duration.ofMillis(10L));
// PDML should time out with these settings.
mockSpanner.setExecuteSqlExecutionTime(
SimulatedExecutionTime.ofMinimumAndRandomTime(1000, 0));
@@ -2933,7 +2935,7 @@ public void testPartitionedDmlWithHigherTimeout() {
.setChannelProvider(channelProvider)
.setCredentials(NoCredentials.getInstance());
// Set PDML timeout value to a value that should allow the statement to be executed.
- builder.setPartitionedDmlTimeout(Duration.ofMillis(5000L));
+ builder.setPartitionedDmlTimeoutDuration(Duration.ofMillis(5000L));
// Set the ExecuteSql RPC timeout value to a value lower than the time needed to execute the
// statement. The higher timeout value that is set above should be respected, and the value for
// the ExecuteSQL RPC should be ignored specifically for Partitioned DML.
@@ -2946,10 +2948,10 @@ public void testPartitionedDmlWithHigherTimeout() {
.executeSqlSettings()
.getRetrySettings()
.toBuilder()
- .setInitialRpcTimeout(Duration.ofMillis(10L))
- .setMaxRpcTimeout(Duration.ofMillis(10L))
- .setInitialRetryDelay(Duration.ofMillis(1L))
- .setMaxRetryDelay(Duration.ofMillis(1L))
+ .setInitialRpcTimeoutDuration(Duration.ofMillis(10L))
+ .setMaxRpcTimeoutDuration(Duration.ofMillis(10L))
+ .setInitialRetryDelayDuration(Duration.ofMillis(1L))
+ .setMaxRetryDelayDuration(Duration.ofMillis(1L))
.build());
try (Spanner spanner = builder.build().getService()) {
DatabaseClient client =
@@ -3051,7 +3053,7 @@ public void testDatabaseOrInstanceDoesNotExistOnCreate() {
.setSessionPoolOption(
SessionPoolOptions.newBuilder()
.setMinSessions(0)
- .setWaitForMinSessions(waitForMinSessions)
+ .setWaitForMinSessionsDuration(waitForMinSessions)
.build())
.build()
.getService()) {
@@ -3737,7 +3739,9 @@ public void testBatchCreateSessionsPermissionDenied() {
.setChannelProvider(channelProvider)
.setCredentials(NoCredentials.getInstance())
.setSessionPoolOption(
- SessionPoolOptions.newBuilder().setWaitForMinSessions(waitForMinSessions).build())
+ SessionPoolOptions.newBuilder()
+ .setWaitForMinSessionsDuration(waitForMinSessions)
+ .build())
.build()
.getService()) {
DatabaseId databaseId = DatabaseId.of("my-project", "my-instance", "my-database");
@@ -3836,7 +3840,7 @@ public void testSpecificTimeout() {
.withValue(
SpannerOptions.CALL_CONTEXT_CONFIGURATOR_KEY,
SpannerCallContextTimeoutConfigurator.create()
- .withExecuteQueryTimeout(Duration.ofNanos(1L)))
+ .withExecuteQueryTimeoutDuration(Duration.ofNanos(1L)))
.run(
() -> {
// Query should fail with a timeout.
@@ -4956,7 +4960,7 @@ public void testStreamWaitTimeout() {
@Override
public ApiCallContext configure(
ApiCallContext context, ReqT request, MethodDescriptor method) {
- return context.withStreamWaitTimeout(Duration.ofNanos(1L));
+ return context.withStreamWaitTimeoutDuration(Duration.ofNanos(1L));
}
};
Context context =
@@ -4983,7 +4987,7 @@ public void testZeroStreamWaitTimeout() {
@Override
public ApiCallContext configure(
ApiCallContext context, ReqT request, MethodDescriptor method) {
- return context.withStreamWaitTimeout(Duration.ZERO);
+ return context.withStreamWaitTimeoutDuration(Duration.ZERO);
}
};
Context context =
@@ -5002,12 +5006,12 @@ public ApiCallContext configure(
public void testRetryOnResourceExhausted() {
final RetrySettings retrySettings =
RetrySettings.newBuilder()
- .setInitialRpcTimeout(Duration.ofSeconds(60L))
- .setMaxRpcTimeout(Duration.ofSeconds(60L))
- .setTotalTimeout(Duration.ofSeconds(60L))
+ .setInitialRpcTimeoutDuration(Duration.ofSeconds(60L))
+ .setMaxRpcTimeoutDuration(Duration.ofSeconds(60L))
+ .setTotalTimeoutDuration(Duration.ofSeconds(60L))
.setRpcTimeoutMultiplier(1.0d)
- .setInitialRetryDelay(Duration.ZERO)
- .setMaxRetryDelay(Duration.ZERO)
+ .setInitialRetryDelayDuration(Duration.ZERO)
+ .setMaxRetryDelayDuration(Duration.ZERO)
.setMaxAttempts(100)
.build();
SpannerOptions.Builder builder =
@@ -5096,7 +5100,7 @@ public void testSessionPoolExhaustedError_containsStackTraces() {
.setFailIfPoolExhausted()
.setMinSessions(2)
.setMaxSessions(4)
- .setWaitForMinSessions(Duration.ofSeconds(10L))
+ .setWaitForMinSessionsDuration(Duration.ofSeconds(10L))
.build())
.build()
.getService()) {
diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/DefaultBenchmark.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/DefaultBenchmark.java
index 7579c4328d2..35712cd5b4e 100644
--- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/DefaultBenchmark.java
+++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/DefaultBenchmark.java
@@ -92,7 +92,7 @@ public void setup() throws Exception {
SessionPoolOptions.newBuilder()
.setMinSessions(minSessions)
.setMaxSessions(maxSessions)
- .setWaitForMinSessions(org.threeten.bp.Duration.ofSeconds(20))
+ .setWaitForMinSessionsDuration(Duration.ofSeconds(20))
.build())
.setHost(SERVER_URL)
.setNumChannels(NUM_GRPC_CHANNELS)
@@ -168,7 +168,7 @@ public void burstUpdates(final BenchmarkState server) throws Exception {
collectResultsAndPrint(service, results, TOTAL_WRITES_PER_RUN);
}
- private List runBenchmarksForSingleUseQueries(
+ private List runBenchmarksForSingleUseQueries(
final BenchmarkState server, int numberOfOperations) {
List results = new ArrayList<>(numberOfOperations);
// Execute one query to make sure everything has been warmed up.
@@ -186,7 +186,7 @@ private void executeWarmup(final BenchmarkState server) {
}
}
- private java.time.Duration executeSingleUseQuery(final BenchmarkState server) {
+ private Duration executeSingleUseQuery(final BenchmarkState server) {
Stopwatch watch = Stopwatch.createStarted();
try (ResultSet rs = server.client.singleUse().executeQuery(getRandomisedReadStatement())) {
@@ -198,7 +198,7 @@ private java.time.Duration executeSingleUseQuery(final BenchmarkState server) {
return watch.elapsed();
}
- private List runBenchmarkForUpdates(
+ private List runBenchmarkForUpdates(
final BenchmarkState server, int numberOfOperations) {
List results = new ArrayList<>(numberOfOperations);
// Execute one query to make sure everything has been warmed up.
@@ -237,7 +237,7 @@ void collectResultsAndPrint(
List>> results,
int numOperationsPerThread)
throws Exception {
- final List collectResults =
+ final List collectResults =
collectResults(
service, results, numOperationsPerThread * PARALLEL_THREADS, Duration.ofMinutes(60));
printResults(collectResults);
diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/FakeClock.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/FakeClock.java
index d46618ce2d0..ab2e859adff 100644
--- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/FakeClock.java
+++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/FakeClock.java
@@ -15,8 +15,8 @@
*/
package com.google.cloud.spanner;
+import java.time.Instant;
import java.util.concurrent.atomic.AtomicLong;
-import org.threeten.bp.Instant;
/**
* Class which allows to mock {@link Clock} in unit tests and return custom time values within the
diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/GrpcResultSetTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/GrpcResultSetTest.java
index 59a18a3ab79..25c01560e92 100644
--- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/GrpcResultSetTest.java
+++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/GrpcResultSetTest.java
@@ -44,6 +44,7 @@
import com.google.spanner.v1.Transaction;
import java.math.BigDecimal;
import java.nio.charset.StandardCharsets;
+import java.time.Duration;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Base64;
@@ -55,7 +56,6 @@
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
-import org.threeten.bp.Duration;
/** Unit tests for {@link GrpcResultSet}. */
@RunWith(JUnit4.class)
@@ -90,7 +90,7 @@ public void setUp() {
new SpannerRpc.StreamingCall() {
@Override
public ApiCallContext getCallContext() {
- return GrpcCallContext.createDefault().withStreamWaitTimeout(streamWaitTimeout);
+ return GrpcCallContext.createDefault().withStreamWaitTimeoutDuration(streamWaitTimeout);
}
@Override
diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/InstanceAdminGaxTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/InstanceAdminGaxTest.java
index c5a317ce5d7..f619d9b461f 100644
--- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/InstanceAdminGaxTest.java
+++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/InstanceAdminGaxTest.java
@@ -44,6 +44,7 @@
import io.grpc.StatusRuntimeException;
import io.grpc.inprocess.InProcessServerBuilder;
import java.io.IOException;
+import java.time.Duration;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
@@ -64,7 +65,6 @@
import org.junit.runners.Parameterized;
import org.junit.runners.Parameterized.Parameter;
import org.junit.runners.Parameterized.Parameters;
-import org.threeten.bp.Duration;
@RunWith(Parameterized.class)
public class InstanceAdminGaxTest {
@@ -221,23 +221,23 @@ public void setUp() throws Exception {
mockInstanceAdmin.reset();
RetrySettings retrySettingsWithLowTimeout =
RetrySettings.newBuilder()
- .setInitialRetryDelay(Duration.ofMillis(1L))
- .setMaxRetryDelay(Duration.ofMillis(10L))
- .setInitialRpcTimeout(Duration.ofMillis(20L))
- .setMaxRpcTimeout(Duration.ofMillis(200L))
+ .setInitialRetryDelayDuration(Duration.ofMillis(1L))
+ .setMaxRetryDelayDuration(Duration.ofMillis(10L))
+ .setInitialRpcTimeoutDuration(Duration.ofMillis(20L))
+ .setMaxRpcTimeoutDuration(Duration.ofMillis(200L))
.setRetryDelayMultiplier(1.3d)
.setMaxAttempts(10)
- .setTotalTimeout(Duration.ofMillis(20000L))
+ .setTotalTimeoutDuration(Duration.ofMillis(20000L))
.setJittered(false)
.build();
RetrySettings retrySettingsWithHighTimeout =
RetrySettings.newBuilder()
- .setInitialRetryDelay(Duration.ofMillis(1L))
- .setMaxRetryDelay(Duration.ofMillis(1L))
- .setInitialRpcTimeout(Duration.ofMillis(2000L))
- .setMaxRpcTimeout(Duration.ofMillis(5000L))
+ .setInitialRetryDelayDuration(Duration.ofMillis(1L))
+ .setMaxRetryDelayDuration(Duration.ofMillis(1L))
+ .setInitialRpcTimeoutDuration(Duration.ofMillis(2000L))
+ .setMaxRpcTimeoutDuration(Duration.ofMillis(5000L))
.setMaxAttempts(3)
- .setTotalTimeout(Duration.ofMillis(15000L))
+ .setTotalTimeoutDuration(Duration.ofMillis(15000L))
.build();
final RetrySettings retrySettingsToUse =
exceptionType == ExceptionType.DELAYED
diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/IntegrationTestWithClosedSessionsEnv.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/IntegrationTestWithClosedSessionsEnv.java
index 6deca476fc3..72cfe0bfe44 100644
--- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/IntegrationTestWithClosedSessionsEnv.java
+++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/IntegrationTestWithClosedSessionsEnv.java
@@ -51,6 +51,7 @@ DatabaseClientImpl createDatabaseClient(
SessionPool pool,
boolean useMultiplexedSessionBlindWriteIgnore,
MultiplexedSessionDatabaseClient ignore,
+ boolean useMultiplexedSessionPartitionedOpsIgnore,
boolean useMultiplexedSessionForRWIgnore) {
return new DatabaseClientWithClosedSessionImpl(clientId, pool, tracer);
}
diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/IsRetryableInternalErrorTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/IsRetryableInternalErrorTest.java
index 63039fcd237..514b1e96b7f 100644
--- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/IsRetryableInternalErrorTest.java
+++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/IsRetryableInternalErrorTest.java
@@ -127,6 +127,17 @@ public void rstStreamInternalExceptionIsRetryable() {
assertTrue(predicate.apply(e));
}
+ @Test
+ public void testAuthenticationBackendInternalServerErrorIsRetryable() {
+ final StatusRuntimeException exception =
+ new StatusRuntimeException(
+ Status.fromCode(Code.INTERNAL)
+ .withDescription(
+ "INTERNAL: Authentication backend internal server error. Please retry."));
+
+ assertTrue(predicate.apply(exception));
+ }
+
@Test
public void genericInternalExceptionIsNotRetryable() {
final InternalException e =
diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/LongRunningSessionsBenchmark.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/LongRunningSessionsBenchmark.java
index 19d614ded07..58eb423a5db 100644
--- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/LongRunningSessionsBenchmark.java
+++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/LongRunningSessionsBenchmark.java
@@ -28,6 +28,7 @@
import com.google.common.util.concurrent.ListeningScheduledExecutorService;
import com.google.common.util.concurrent.MoreExecutors;
import com.google.spanner.v1.BatchCreateSessionsRequest;
+import java.time.Duration;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
@@ -48,7 +49,6 @@
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.annotations.TearDown;
import org.openjdk.jmh.annotations.Warmup;
-import org.threeten.bp.Duration;
/**
* Benchmarks for long-running sessions scenarios. The simulated execution times are based on
@@ -126,7 +126,7 @@ public void setup() throws Exception {
SessionPoolOptions.newBuilder()
.setMinSessions(minSessions)
.setMaxSessions(maxSessions)
- .setWaitForMinSessions(Duration.ofSeconds(5))
+ .setWaitForMinSessionsDuration(Duration.ofSeconds(5))
.setInactiveTransactionRemovalOptions(inactiveTransactionRemovalOptions)
.build())
.build();
diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/MockDatabaseAdminServiceImplTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/MockDatabaseAdminServiceImplTest.java
index 9c9f0e7f91a..637f97cb097 100644
--- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/MockDatabaseAdminServiceImplTest.java
+++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/MockDatabaseAdminServiceImplTest.java
@@ -58,6 +58,7 @@
import com.google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata;
import com.google.spanner.admin.database.v1.UpdateDatabaseDdlRequest;
import java.io.IOException;
+import java.time.Duration;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
@@ -74,7 +75,6 @@
import org.junit.rules.ExpectedException;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
-import org.threeten.bp.Duration;
@RunWith(JUnit4.class)
public class MockDatabaseAdminServiceImplTest {
@@ -150,12 +150,12 @@ public void setUp() throws IOException {
.setPollingAlgorithm(
OperationTimedPollAlgorithm.create(
RetrySettings.newBuilder()
- .setInitialRpcTimeout(Duration.ofMillis(20L))
- .setInitialRetryDelay(Duration.ofMillis(10L))
- .setMaxRetryDelay(Duration.ofMillis(150L))
- .setMaxRpcTimeout(Duration.ofMillis(150L))
+ .setInitialRpcTimeoutDuration(Duration.ofMillis(20L))
+ .setInitialRetryDelayDuration(Duration.ofMillis(10L))
+ .setMaxRetryDelayDuration(Duration.ofMillis(150L))
+ .setMaxRpcTimeoutDuration(Duration.ofMillis(150L))
.setMaxAttempts(10)
- .setTotalTimeout(Duration.ofMillis(5000L))
+ .setTotalTimeoutDuration(Duration.ofMillis(5000L))
.setRetryDelayMultiplier(1.3)
.setRpcTimeoutMultiplier(1.3)
.build()));
@@ -164,12 +164,12 @@ public void setUp() throws IOException {
.setPollingAlgorithm(
OperationTimedPollAlgorithm.create(
RetrySettings.newBuilder()
- .setInitialRpcTimeout(Duration.ofMillis(20L))
- .setInitialRetryDelay(Duration.ofMillis(10L))
- .setMaxRetryDelay(Duration.ofMillis(150L))
- .setMaxRpcTimeout(Duration.ofMillis(150L))
+ .setInitialRpcTimeoutDuration(Duration.ofMillis(20L))
+ .setInitialRetryDelayDuration(Duration.ofMillis(10L))
+ .setMaxRetryDelayDuration(Duration.ofMillis(150L))
+ .setMaxRpcTimeoutDuration(Duration.ofMillis(150L))
.setMaxAttempts(10)
- .setTotalTimeout(Duration.ofMillis(5000L))
+ .setTotalTimeoutDuration(Duration.ofMillis(5000L))
.setRetryDelayMultiplier(1.3)
.setRpcTimeoutMultiplier(1.3)
.build()));
@@ -178,12 +178,12 @@ public void setUp() throws IOException {
.setPollingAlgorithm(
OperationTimedPollAlgorithm.create(
RetrySettings.newBuilder()
- .setInitialRpcTimeout(Duration.ofMillis(20L))
- .setInitialRetryDelay(Duration.ofMillis(10L))
- .setMaxRetryDelay(Duration.ofMillis(150L))
- .setMaxRpcTimeout(Duration.ofMillis(150L))
+ .setInitialRpcTimeoutDuration(Duration.ofMillis(20L))
+ .setInitialRetryDelayDuration(Duration.ofMillis(10L))
+ .setMaxRetryDelayDuration(Duration.ofMillis(150L))
+ .setMaxRpcTimeoutDuration(Duration.ofMillis(150L))
.setMaxAttempts(10)
- .setTotalTimeout(Duration.ofMillis(5000L))
+ .setTotalTimeoutDuration(Duration.ofMillis(5000L))
.setRetryDelayMultiplier(1.3)
.setRpcTimeoutMultiplier(1.3)
.build()));
diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/MockSpannerServiceImpl.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/MockSpannerServiceImpl.java
index 39f1ff180fa..676cb05eb07 100644
--- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/MockSpannerServiceImpl.java
+++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/MockSpannerServiceImpl.java
@@ -86,6 +86,7 @@
import io.grpc.protobuf.lite.ProtoLiteUtils;
import io.grpc.stub.StreamObserver;
import java.math.BigDecimal;
+import java.time.Instant;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
@@ -112,7 +113,6 @@
import java.util.concurrent.atomic.AtomicLong;
import java.util.stream.Collectors;
import java.util.stream.LongStream;
-import org.threeten.bp.Instant;
/**
* In-process mock implementation of a Cloud Spanner server. The user must specify the results the
diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/MultiplexedSessionDatabaseClientMockServerTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/MultiplexedSessionDatabaseClientMockServerTest.java
index 4dc1da62e7b..c808bbe1110 100644
--- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/MultiplexedSessionDatabaseClientMockServerTest.java
+++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/MultiplexedSessionDatabaseClientMockServerTest.java
@@ -93,12 +93,12 @@ public void createSpannerInstance() {
.setSessionPoolOption(
SessionPoolOptions.newBuilder()
.setUseMultiplexedSession(true)
- .setUseMultiplexedSessionBlindWrite(true)
.setUseMultiplexedSessionForRW(true)
+ .setUseMultiplexedSessionPartitionedOps(true)
// Set the maintainer to loop once every 1ms
.setMultiplexedSessionMaintenanceLoopFrequency(Duration.ofMillis(1L))
// Set multiplexed sessions to be replaced once every 1ms
- .setMultiplexedSessionMaintenanceDuration(org.threeten.bp.Duration.ofMillis(1L))
+ .setMultiplexedSessionMaintenanceDuration(Duration.ofMillis(1L))
.setFailOnSessionLeak()
.build())
.build()
diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/MultiplexedSessionDatabaseClientTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/MultiplexedSessionDatabaseClientTest.java
index 287fdd0bd0b..9a43ad07cdf 100644
--- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/MultiplexedSessionDatabaseClientTest.java
+++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/MultiplexedSessionDatabaseClientTest.java
@@ -60,7 +60,7 @@ public void testMaintainer() {
when(spanner.getOptions()).thenReturn(spannerOptions);
when(spannerOptions.getSessionPoolOptions()).thenReturn(sessionPoolOptions);
when(sessionPoolOptions.getMultiplexedSessionMaintenanceDuration())
- .thenReturn(org.threeten.bp.Duration.ofDays(7));
+ .thenReturn(Duration.ofDays(7));
when(sessionPoolOptions.getMultiplexedSessionMaintenanceLoopFrequency())
.thenReturn(Duration.ofMinutes(10));
diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/MultiplexedSessionsBenchmark.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/MultiplexedSessionsBenchmark.java
index ff976141d96..c6f7e22f280 100644
--- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/MultiplexedSessionsBenchmark.java
+++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/MultiplexedSessionsBenchmark.java
@@ -95,7 +95,7 @@ public void setup() throws Exception {
SessionPoolOptions.newBuilder()
.setMinSessions(minSessions)
.setMaxSessions(maxSessions)
- .setWaitForMinSessions(org.threeten.bp.Duration.ofSeconds(20))
+ .setWaitForMinSessionsDuration(Duration.ofSeconds(20))
.setUseMultiplexedSession(true)
.build())
.setHost(SERVER_URL)
@@ -132,7 +132,7 @@ public void burstQueries(final BenchmarkState server) throws Exception {
collectResultsAndPrint(service, results, TOTAL_READS_PER_RUN);
}
- private List runBenchmarksForSingleUseQueries(
+ private List runBenchmarksForSingleUseQueries(
final BenchmarkState server, int numberOfOperations) {
List results = new ArrayList<>(numberOfOperations);
// Execute one query to make sure everything has been warmed up.
@@ -150,7 +150,7 @@ private void executeWarmup(final BenchmarkState server) {
}
}
- private java.time.Duration executeSingleUseQuery(final BenchmarkState server) {
+ private Duration executeSingleUseQuery(final BenchmarkState server) {
Stopwatch watch = Stopwatch.createStarted();
try (ResultSet rs = server.client.singleUse().executeQuery(getRandomisedReadStatement())) {
@@ -175,7 +175,7 @@ void collectResultsAndPrint(
List>> results,
int numOperationsPerThread)
throws Exception {
- final List collectResults =
+ final List collectResults =
collectResults(
service, results, numOperationsPerThread * PARALLEL_THREADS, Duration.ofMinutes(60));
printResults(collectResults);
diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/OpenCensusApiTracerTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/OpenCensusApiTracerTest.java
index 5e7a58cdb23..ad27c775729 100644
--- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/OpenCensusApiTracerTest.java
+++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/OpenCensusApiTracerTest.java
@@ -41,6 +41,7 @@
import io.opentelemetry.api.common.Attributes;
import io.opentelemetry.sdk.trace.data.SpanData;
import java.lang.reflect.Modifier;
+import java.time.Duration;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
@@ -55,7 +56,6 @@
import org.junit.experimental.categories.Category;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
-import org.threeten.bp.Duration;
@Category(TracerTest.class)
@RunWith(JUnit4.class)
@@ -121,10 +121,10 @@ public void createSpannerInstance() {
.setPollingAlgorithm(
OperationTimedPollAlgorithm.create(
RetrySettings.newBuilder()
- .setInitialRetryDelay(Duration.ofNanos(1L))
- .setMaxRetryDelay(Duration.ofNanos(1L))
+ .setInitialRetryDelayDuration(Duration.ofNanos(1L))
+ .setMaxRetryDelayDuration(Duration.ofNanos(1L))
.setRetryDelayMultiplier(1.0)
- .setTotalTimeout(Duration.ofMinutes(10L))
+ .setTotalTimeoutDuration(Duration.ofMinutes(10L))
.build()));
spanner =
builder
@@ -133,7 +133,7 @@ public void createSpannerInstance() {
.setCredentials(NoCredentials.getInstance())
.setSessionPoolOption(
SessionPoolOptions.newBuilder()
- .setWaitForMinSessions(Duration.ofSeconds(5L))
+ .setWaitForMinSessionsDuration(Duration.ofSeconds(5L))
.setFailOnSessionLeak()
.build())
.setEnableApiTracing(true)
@@ -359,7 +359,7 @@ public boolean isEnableApiTracing() {
.setCredentials(NoCredentials.getInstance())
.setSessionPoolOption(
SessionPoolOptions.newBuilder()
- .setWaitForMinSessions(Duration.ofSeconds(5L))
+ .setWaitForMinSessionsDuration(Duration.ofSeconds(5L))
.setFailOnSessionLeak()
.build())
.build()
diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/OpenTelemetryApiTracerTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/OpenTelemetryApiTracerTest.java
index 123f0f486a7..e4d25f1d9b3 100644
--- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/OpenTelemetryApiTracerTest.java
+++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/OpenTelemetryApiTracerTest.java
@@ -47,6 +47,7 @@
import io.opentelemetry.sdk.trace.data.EventData;
import io.opentelemetry.sdk.trace.data.SpanData;
import io.opentelemetry.sdk.trace.export.SimpleSpanProcessor;
+import java.time.Duration;
import java.util.List;
import java.util.Map.Entry;
import java.util.Objects;
@@ -58,7 +59,6 @@
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
-import org.threeten.bp.Duration;
@RunWith(JUnit4.class)
public class OpenTelemetryApiTracerTest extends AbstractMockServerTest {
@@ -121,10 +121,10 @@ public void createSpannerInstance() {
.setPollingAlgorithm(
OperationTimedPollAlgorithm.create(
RetrySettings.newBuilder()
- .setInitialRetryDelay(Duration.ofNanos(1L))
- .setMaxRetryDelay(Duration.ofNanos(1L))
+ .setInitialRetryDelayDuration(Duration.ofNanos(1L))
+ .setMaxRetryDelayDuration(Duration.ofNanos(1L))
.setRetryDelayMultiplier(1.0)
- .setTotalTimeout(Duration.ofMinutes(10L))
+ .setTotalTimeoutDuration(Duration.ofMinutes(10L))
.build()));
spanner =
builder
@@ -133,7 +133,7 @@ public void createSpannerInstance() {
.setCredentials(NoCredentials.getInstance())
.setSessionPoolOption(
SessionPoolOptions.newBuilder()
- .setWaitForMinSessions(Duration.ofSeconds(5L))
+ .setWaitForMinSessionsDuration(Duration.ofSeconds(5L))
.setFailOnSessionLeak()
.build())
.setEnableApiTracing(true)
@@ -426,7 +426,7 @@ public boolean isEnableApiTracing() {
.setCredentials(NoCredentials.getInstance())
.setSessionPoolOption(
SessionPoolOptions.newBuilder()
- .setWaitForMinSessions(Duration.ofSeconds(5L))
+ .setWaitForMinSessionsDuration(Duration.ofSeconds(5L))
.setFailOnSessionLeak()
.build())
.build()
diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/OpenTelemetryBuiltInMetricsTracerTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/OpenTelemetryBuiltInMetricsTracerTest.java
index 9f65402c31f..7a14681d525 100644
--- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/OpenTelemetryBuiltInMetricsTracerTest.java
+++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/OpenTelemetryBuiltInMetricsTracerTest.java
@@ -43,6 +43,7 @@
import io.opentelemetry.sdk.metrics.data.LongPointData;
import io.opentelemetry.sdk.metrics.data.MetricData;
import io.opentelemetry.sdk.testing.exporter.InMemoryMetricReader;
+import java.time.Duration;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
@@ -55,7 +56,6 @@
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
-import org.threeten.bp.Duration;
@RunWith(JUnit4.class)
public class OpenTelemetryBuiltInMetricsTracerTest extends AbstractMockServerTest {
@@ -130,10 +130,10 @@ public void createSpannerInstance() {
.setPollingAlgorithm(
OperationTimedPollAlgorithm.create(
RetrySettings.newBuilder()
- .setInitialRetryDelay(Duration.ofNanos(1L))
- .setMaxRetryDelay(Duration.ofNanos(1L))
+ .setInitialRetryDelayDuration(Duration.ofNanos(1L))
+ .setMaxRetryDelayDuration(Duration.ofNanos(1L))
.setRetryDelayMultiplier(1.0)
- .setTotalTimeout(Duration.ofMinutes(10L))
+ .setTotalTimeoutDuration(Duration.ofMinutes(10L))
.build()));
spanner =
builder
@@ -142,7 +142,7 @@ public void createSpannerInstance() {
.setCredentials(NoCredentials.getInstance())
.setSessionPoolOption(
SessionPoolOptions.newBuilder()
- .setWaitForMinSessions(Duration.ofSeconds(5L))
+ .setWaitForMinSessionsDuration(Duration.ofSeconds(5L))
.setFailOnSessionLeak()
.build())
// Setting this to false so that Spanner Options does not register Metrics Tracer
diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/OpenTelemetrySpanTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/OpenTelemetrySpanTest.java
index a2aeb887733..f7f547ce357 100644
--- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/OpenTelemetrySpanTest.java
+++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/OpenTelemetrySpanTest.java
@@ -47,6 +47,7 @@
import io.opentelemetry.sdk.trace.data.SpanData;
import io.opentelemetry.sdk.trace.export.SimpleSpanProcessor;
import java.lang.reflect.Modifier;
+import java.time.Duration;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.TimeUnit;
@@ -60,7 +61,6 @@
import org.junit.experimental.categories.Category;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
-import org.threeten.bp.Duration;
@Category(TracerTest.class)
@RunWith(JUnit4.class)
@@ -237,7 +237,7 @@ public void setUp() throws Exception {
.setSessionPoolOption(
SessionPoolOptions.newBuilder()
.setMinSessions(2)
- .setWaitForMinSessions(Duration.ofSeconds(10))
+ .setWaitForMinSessionsDuration(Duration.ofSeconds(10))
.build());
spanner = builder.build().getService();
diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/OperationTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/OperationTest.java
index 20fa72252f5..55211de1980 100644
--- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/OperationTest.java
+++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/OperationTest.java
@@ -31,12 +31,12 @@
import com.google.rpc.Code;
import com.google.rpc.Status;
import com.google.spanner.admin.database.v1.CreateDatabaseMetadata;
+import java.time.Duration;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
import org.mockito.Mock;
-import org.threeten.bp.Duration;
/** Unit tests for {@link Operation}. */
@RunWith(JUnit4.class)
@@ -160,8 +160,8 @@ public void waitForCompletes() {
op =
op.waitFor(
- RetryOption.totalTimeout(Duration.ofSeconds(3)),
- RetryOption.initialRetryDelay(Duration.ZERO));
+ RetryOption.totalTimeoutDuration(Duration.ofSeconds(3)),
+ RetryOption.initialRetryDelayDuration(Duration.ZERO));
assertThat(op.getName()).isEqualTo("op1");
assertThat(op.isDone()).isTrue();
@@ -181,8 +181,8 @@ public void waitForTimeout() {
SpannerException.class,
() ->
op.waitFor(
- RetryOption.totalTimeout(Duration.ofMillis(100L)),
- RetryOption.initialRetryDelay(Duration.ZERO)));
+ RetryOption.totalTimeoutDuration(Duration.ofMillis(100L)),
+ RetryOption.initialRetryDelayDuration(Duration.ZERO)));
assertEquals(ErrorCode.DEADLINE_EXCEEDED, e.getErrorCode());
}
}
diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/PartitionedDmlTransactionTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/PartitionedDmlTransactionTest.java
index 93e0e3eb3d0..68bfcca6146 100644
--- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/PartitionedDmlTransactionTest.java
+++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/PartitionedDmlTransactionTest.java
@@ -47,6 +47,7 @@
import com.google.spanner.v1.Transaction;
import com.google.spanner.v1.TransactionSelector;
import io.grpc.Status.Code;
+import java.time.Duration;
import java.util.Collections;
import java.util.Iterator;
import java.util.concurrent.TimeUnit;
@@ -59,7 +60,6 @@
import org.mockito.MockitoAnnotations;
import org.mockito.invocation.InvocationOnMock;
import org.mockito.stubbing.Answer;
-import org.threeten.bp.Duration;
@SuppressWarnings("unchecked")
@RunWith(JUnit4.class)
diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/RetryOnDifferentGrpcChannelMockServerTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/RetryOnDifferentGrpcChannelMockServerTest.java
index b5e3e2e54cf..267c6077add 100644
--- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/RetryOnDifferentGrpcChannelMockServerTest.java
+++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/RetryOnDifferentGrpcChannelMockServerTest.java
@@ -42,6 +42,7 @@
import io.grpc.Status;
import java.io.IOException;
import java.net.InetSocketAddress;
+import java.time.Duration;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
@@ -58,7 +59,6 @@
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
-import org.threeten.bp.Duration;
@RunWith(JUnit4.class)
public class RetryOnDifferentGrpcChannelMockServerTest extends AbstractMockServerTest {
@@ -125,7 +125,9 @@ SpannerOptions.Builder createSpannerOptionsBuilder() {
public void testReadWriteTransaction_retriesOnNewChannel() {
SpannerOptions.Builder builder = createSpannerOptionsBuilder();
builder.setSessionPoolOption(
- SessionPoolOptions.newBuilder().setWaitForMinSessions(Duration.ofSeconds(5L)).build());
+ SessionPoolOptions.newBuilder()
+ .setWaitForMinSessionsDuration(Duration.ofSeconds(5L))
+ .build());
mockSpanner.setBeginTransactionExecutionTime(
SimulatedExecutionTime.ofStickyException(Status.DEADLINE_EXCEEDED.asRuntimeException()));
AtomicInteger attempts = new AtomicInteger();
@@ -159,7 +161,9 @@ public void testReadWriteTransaction_retriesOnNewChannel() {
public void testReadWriteTransaction_stopsRetrying() {
SpannerOptions.Builder builder = createSpannerOptionsBuilder();
builder.setSessionPoolOption(
- SessionPoolOptions.newBuilder().setWaitForMinSessions(Duration.ofSeconds(5L)).build());
+ SessionPoolOptions.newBuilder()
+ .setWaitForMinSessionsDuration(Duration.ofSeconds(5L))
+ .build());
mockSpanner.setBeginTransactionExecutionTime(
SimulatedExecutionTime.ofStickyException(Status.DEADLINE_EXCEEDED.asRuntimeException()));
@@ -200,7 +204,7 @@ public void testDenyListedChannelIsCleared() {
SpannerOptions.Builder builder = createSpannerOptionsBuilder();
builder.setSessionPoolOption(
SessionPoolOptions.newBuilder()
- .setWaitForMinSessions(Duration.ofSeconds(5))
+ .setWaitForMinSessionsDuration(Duration.ofSeconds(5))
.setPoolMaintainerClock(clock)
.build());
mockSpanner.setBeginTransactionExecutionTime(
@@ -328,7 +332,9 @@ public void testSingleUseQuery_stopsRetrying() {
public void testReadWriteTransaction_withGrpcContextDeadline_doesNotRetry() {
SpannerOptions.Builder builder = createSpannerOptionsBuilder();
builder.setSessionPoolOption(
- SessionPoolOptions.newBuilder().setWaitForMinSessions(Duration.ofSeconds(5L)).build());
+ SessionPoolOptions.newBuilder()
+ .setWaitForMinSessionsDuration(Duration.ofSeconds(5L))
+ .build());
mockSpanner.setBeginTransactionExecutionTime(
SimulatedExecutionTime.ofMinimumAndRandomTime(500, 500));
diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/RetryOnInvalidatedSessionTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/RetryOnInvalidatedSessionTest.java
index 42a62be33aa..f070f154216 100644
--- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/RetryOnInvalidatedSessionTest.java
+++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/RetryOnInvalidatedSessionTest.java
@@ -207,7 +207,7 @@ public static void stopServer() throws InterruptedException {
public void setUp() throws InterruptedException {
mockSpanner.reset();
if (spanner == null
- || spanner.getOptions().getSessionPoolOptions().isFailIfPoolExhausted()
+ || spanner.getOptions().getSessionPoolOptions().isFailIfSessionNotFound()
!= failOnInvalidatedSession) {
if (spanner != null) {
spanner.close();
@@ -228,8 +228,8 @@ public void setUp() throws InterruptedException {
.build()
.getService();
client = spanner.getDatabaseClient(DatabaseId.of("[PROJECT]", "[INSTANCE]", "[DATABASE]"));
- invalidateSessionPool(client, spanner.getOptions().getSessionPoolOptions().getMinSessions());
}
+ invalidateSessionPool(client, spanner.getOptions().getSessionPoolOptions().getMinSessions());
}
private static void invalidateSessionPool(DatabaseClient client, int minSessions)
@@ -1002,6 +1002,7 @@ public void transactionManagerBatchUpdate() throws InterruptedException {
} catch (AbortedException e) {
transaction = assertThrowsSessionNotFoundIfShouldFail(() -> manager.resetForRetry());
if (transaction == null) {
+ manager.close();
break;
}
}
@@ -1273,6 +1274,9 @@ public void transactionManagerReadRowUsingIndexInvalidatedDuringTransaction()
@Test
public void partitionedDml() throws InterruptedException {
+ assumeFalse(
+ "Multiplexed session do not throw a SessionNotFound errors. ",
+ spanner.getOptions().getSessionPoolOptions().getUseMultiplexedSessionPartitionedOps());
assertThrowsSessionNotFoundIfShouldFail(
() -> client.executePartitionedUpdate(UPDATE_STATEMENT));
}
@@ -1285,6 +1289,9 @@ public void write() throws InterruptedException {
@Test
public void writeAtLeastOnce() throws InterruptedException {
+ assumeFalse(
+ "Multiplexed session do not throw a SessionNotFound errors. ",
+ spanner.getOptions().getSessionPoolOptions().getUseMultiplexedSession());
assertThrowsSessionNotFoundIfShouldFail(
() ->
client.writeAtLeastOnce(
diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/RetryableInternalErrorTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/RetryableInternalErrorTest.java
new file mode 100644
index 00000000000..3106bd16526
--- /dev/null
+++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/RetryableInternalErrorTest.java
@@ -0,0 +1,95 @@
+/*
+ * Copyright 2024 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.google.cloud.spanner;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+import com.google.cloud.NoCredentials;
+import com.google.cloud.spanner.MockSpannerServiceImpl.SimulatedExecutionTime;
+import com.google.cloud.spanner.connection.AbstractMockServerTest;
+import com.google.spanner.v1.BatchCreateSessionsRequest;
+import com.google.spanner.v1.ExecuteSqlRequest;
+import io.grpc.ManagedChannelBuilder;
+import io.grpc.Status;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
+import org.threeten.bp.Duration;
+
+@RunWith(JUnit4.class)
+public class RetryableInternalErrorTest extends AbstractMockServerTest {
+ @Test
+ public void testTranslateInternalException() {
+ mockSpanner.setBatchCreateSessionsExecutionTime(
+ SimulatedExecutionTime.ofException(
+ Status.INTERNAL
+ .withDescription("Authentication backend internal server error. Please retry.")
+ .asRuntimeException()));
+ mockSpanner.setExecuteStreamingSqlExecutionTime(
+ SimulatedExecutionTime.ofException(
+ Status.INTERNAL
+ .withDescription("Authentication backend internal server error. Please retry.")
+ .asRuntimeException()));
+
+ try (Spanner spanner =
+ SpannerOptions.newBuilder()
+ .setProjectId("my-project")
+ .setHost(String.format("http://localhost:%d", getPort()))
+ .setChannelConfigurator(ManagedChannelBuilder::usePlaintext)
+ .setCredentials(NoCredentials.getInstance())
+ .setSessionPoolOption(
+ SessionPoolOptions.newBuilder()
+ .setMinSessions(1)
+ .setMaxSessions(1)
+ .setWaitForMinSessions(Duration.ofSeconds(5))
+ .build())
+ .build()
+ .getService()) {
+
+ DatabaseClient client = spanner.getDatabaseClient(DatabaseId.of("p", "i", "d"));
+ // Execute a query. This will block until a BatchCreateSessions call has finished and then
+ // invoke ExecuteStreamingSql. Both of these RPCs should be retried.
+ try (ResultSet resultSet = client.singleUse().executeQuery(SELECT1_STATEMENT)) {
+ assertTrue(resultSet.next());
+ assertFalse(resultSet.next());
+ }
+ // Verify that both the BatchCreateSessions call and the ExecuteStreamingSql call were
+ // retried.
+ assertEquals(2, mockSpanner.countRequestsOfType(BatchCreateSessionsRequest.class));
+ assertEquals(2, mockSpanner.countRequestsOfType(ExecuteSqlRequest.class));
+ // Clear the requests before the next test.
+ mockSpanner.clearRequests();
+
+ // Execute a DML statement. This uses the ExecuteSql RPC.
+ assertEquals(0, mockSpanner.countRequestsOfType(ExecuteSqlRequest.class));
+ mockSpanner.setExecuteSqlExecutionTime(
+ SimulatedExecutionTime.ofException(
+ Status.INTERNAL
+ .withDescription("Authentication backend internal server error. Please retry.")
+ .asRuntimeException()));
+ assertEquals(
+ Long.valueOf(1L),
+ client
+ .readWriteTransaction()
+ .run(transaction -> transaction.executeUpdate(INSERT_STATEMENT)));
+ // Verify that also this request was retried.
+ assertEquals(2, mockSpanner.countRequestsOfType(ExecuteSqlRequest.class));
+ }
+ }
+}
diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/SamplesMockServerTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/SamplesMockServerTest.java
index d8dcfc10e05..61c8d0573d7 100644
--- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/SamplesMockServerTest.java
+++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/SamplesMockServerTest.java
@@ -23,10 +23,10 @@
import com.google.api.gax.rpc.StatusCode;
import com.google.cloud.NoCredentials;
import com.google.cloud.spanner.MockSpannerServiceImpl.StatementResult;
+import java.time.Duration;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
-import org.threeten.bp.Duration;
/** Tests for samples that use an in-mem mock server instead of running on real Cloud Spanner. */
@RunWith(JUnit4.class)
@@ -52,13 +52,13 @@ public void testSampleRetrySettings() {
.setRetryableCodes(StatusCode.Code.UNAVAILABLE)
.setRetrySettings(
RetrySettings.newBuilder()
- .setInitialRetryDelay(Duration.ofMillis(500))
- .setMaxRetryDelay(Duration.ofSeconds(16))
+ .setInitialRetryDelayDuration(Duration.ofMillis(500))
+ .setMaxRetryDelayDuration(Duration.ofSeconds(16))
.setRetryDelayMultiplier(1.5)
- .setInitialRpcTimeout(Duration.ofNanos(1L))
- .setMaxRpcTimeout(Duration.ofNanos(1L))
+ .setInitialRpcTimeoutDuration(Duration.ofNanos(1L))
+ .setMaxRpcTimeoutDuration(Duration.ofNanos(1L))
.setRpcTimeoutMultiplier(1.0)
- .setTotalTimeout(Duration.ofNanos(1L))
+ .setTotalTimeoutDuration(Duration.ofNanos(1L))
.build());
// Create a Spanner client using the custom retry and timeout settings.
try (Spanner spanner = builder.build().getService()) {
diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/SessionPoolMaintainerBenchmark.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/SessionPoolMaintainerBenchmark.java
index 5f624cb6092..0370f5420e2 100644
--- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/SessionPoolMaintainerBenchmark.java
+++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/SessionPoolMaintainerBenchmark.java
@@ -27,6 +27,7 @@
import com.google.spanner.v1.BatchCreateSessionsRequest;
import com.google.spanner.v1.BeginTransactionRequest;
import com.google.spanner.v1.DeleteSessionRequest;
+import java.time.Duration;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
@@ -46,7 +47,6 @@
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.annotations.TearDown;
import org.openjdk.jmh.annotations.Warmup;
-import org.threeten.bp.Duration;
/**
* Benchmarks for the SessionPoolMaintainer. Run these benchmarks from the command line like this:
@@ -111,7 +111,7 @@ public void setup() throws Exception {
.setSessionPoolOption(
SessionPoolOptions.newBuilder()
// Set idle timeout and loop frequency to very low values.
- .setRemoveInactiveSessionAfter(Duration.ofMillis(idleTimeout))
+ .setRemoveInactiveSessionAfterDuration(Duration.ofMillis(idleTimeout))
.setLoopFrequency(idleTimeout / 10)
.build())
.build();
diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/SessionPoolMaintainerMockServerTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/SessionPoolMaintainerMockServerTest.java
index c74806161f6..99a773eeb0f 100644
--- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/SessionPoolMaintainerMockServerTest.java
+++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/SessionPoolMaintainerMockServerTest.java
@@ -33,13 +33,13 @@
import com.google.spanner.v1.StructType.Field;
import com.google.spanner.v1.Type;
import com.google.spanner.v1.TypeCode;
+import java.time.Duration;
import java.util.concurrent.TimeUnit;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
-import org.threeten.bp.Duration;
@RunWith(JUnit4.class)
public class SessionPoolMaintainerMockServerTest extends AbstractMockServerTest {
@@ -80,7 +80,7 @@ public void createSpannerInstance() {
.setSessionPoolOption(
SessionPoolOptions.newBuilder()
.setPoolMaintainerClock(clock)
- .setWaitForMinSessions(Duration.ofSeconds(10L))
+ .setWaitForMinSessionsDuration(Duration.ofSeconds(10L))
.setFailOnSessionLeak()
.build())
.build()
diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/SessionPoolOptionsTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/SessionPoolOptionsTest.java
index 2e3e2c85da3..9e16b3fb1c8 100644
--- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/SessionPoolOptionsTest.java
+++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/SessionPoolOptionsTest.java
@@ -25,6 +25,7 @@
import static org.junit.Assume.assumeFalse;
import com.google.cloud.spanner.SessionPoolOptions.InactiveTransactionRemovalOptions;
+import java.time.Duration;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
@@ -34,7 +35,6 @@
import org.junit.runners.Parameterized;
import org.junit.runners.Parameterized.Parameter;
import org.junit.runners.Parameterized.Parameters;
-import org.threeten.bp.Duration;
/** Unit tests for {@link com.google.cloud.spanner.SessionPoolOptions} */
@RunWith(Parameterized.class)
@@ -223,10 +223,12 @@ public void setNegativeIdleTimeThreshold() {
@Test
public void setAcquireSessionTimeout() {
SessionPoolOptions sessionPoolOptions1 =
- SessionPoolOptions.newBuilder().setAcquireSessionTimeout(Duration.ofSeconds(20)).build();
+ SessionPoolOptions.newBuilder()
+ .setAcquireSessionTimeoutDuration(Duration.ofSeconds(20))
+ .build();
SessionPoolOptions sessionPoolOptions2 =
SessionPoolOptions.newBuilder()
- .setAcquireSessionTimeout(Duration.ofMillis(Long.MAX_VALUE))
+ .setAcquireSessionTimeoutDuration(Duration.ofMillis(Long.MAX_VALUE))
.build();
assertEquals(Duration.ofSeconds(20), sessionPoolOptions1.getAcquireSessionTimeout());
@@ -235,13 +237,13 @@ public void setAcquireSessionTimeout() {
@Test(expected = IllegalArgumentException.class)
public void setAcquireSessionTimeout_valueLessThanLowerBound() {
- SessionPoolOptions.newBuilder().setAcquireSessionTimeout(Duration.ofMillis(0)).build();
+ SessionPoolOptions.newBuilder().setAcquireSessionTimeoutDuration(Duration.ofMillis(0)).build();
}
@Test(expected = IllegalArgumentException.class)
public void setAcquireSessionTimeout_valueMoreThanUpperBound() {
SessionPoolOptions.newBuilder()
- .setAcquireSessionTimeout(Duration.ofSeconds(Long.MAX_VALUE))
+ .setAcquireSessionTimeoutDuration(Duration.ofSeconds(Long.MAX_VALUE))
.build();
}
@@ -418,7 +420,7 @@ public void testToBuilder() {
.build());
assertToBuilderRoundtrip(
SessionPoolOptions.newBuilder()
- .setRemoveInactiveSessionAfter(
+ .setRemoveInactiveSessionAfterDuration(
Duration.ofMillis(ThreadLocalRandom.current().nextLong(10000)))
.build());
assertToBuilderRoundtrip(
@@ -438,11 +440,12 @@ public void testToBuilder() {
.build());
assertToBuilderRoundtrip(
SessionPoolOptions.newBuilder()
- .setWaitForMinSessions(Duration.ofMillis(ThreadLocalRandom.current().nextLong(10000)))
+ .setWaitForMinSessionsDuration(
+ Duration.ofMillis(ThreadLocalRandom.current().nextLong(10000)))
.build());
assertToBuilderRoundtrip(
SessionPoolOptions.newBuilder()
- .setAcquireSessionTimeout(
+ .setAcquireSessionTimeoutDuration(
Duration.ofMillis(ThreadLocalRandom.current().nextLong(1, 10000)))
.build());
assertToBuilderRoundtrip(
diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/SessionPoolTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/SessionPoolTest.java
index 00339fd2946..0389410064a 100644
--- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/SessionPoolTest.java
+++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/SessionPoolTest.java
@@ -105,6 +105,9 @@
import io.opentelemetry.sdk.testing.exporter.InMemoryMetricReader;
import java.io.PrintWriter;
import java.io.StringWriter;
+import java.time.Duration;
+import java.time.Instant;
+import java.time.temporal.ChronoUnit;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
@@ -133,9 +136,6 @@
import org.junit.runners.Parameterized.Parameters;
import org.mockito.Mock;
import org.mockito.Mockito;
-import org.threeten.bp.Duration;
-import org.threeten.bp.Instant;
-import org.threeten.bp.temporal.ChronoUnit;
/** Tests for SessionPool that mock out the underlying stub. */
@RunWith(Parameterized.class)
@@ -314,7 +314,7 @@ public void poolLifo() {
options
.toBuilder()
.setMinSessions(2)
- .setWaitForMinSessions(Duration.ofSeconds(10L))
+ .setWaitForMinSessionsDuration(Duration.ofSeconds(10L))
.build();
pool = createPool();
pool.maybeWaitOnMinSessions();
@@ -350,7 +350,7 @@ public void poolFifo() throws Exception {
options
.toBuilder()
.setMinSessions(2)
- .setWaitForMinSessions(Duration.ofSeconds(10L))
+ .setWaitForMinSessionsDuration(Duration.ofSeconds(10L))
.build();
pool = createPool();
pool.maybeWaitOnMinSessions();
@@ -398,7 +398,7 @@ public void poolAllPositions() throws Exception {
.toBuilder()
.setMinSessions(numSessions)
.setMaxSessions(numSessions)
- .setWaitForMinSessions(Duration.ofSeconds(10L))
+ .setWaitForMinSessionsDuration(Duration.ofSeconds(10L))
.build();
pool = createPool();
pool.maybeWaitOnMinSessions();
@@ -2212,7 +2212,7 @@ public void testWaitOnMinSessionsWhenSessionsAreCreatedBeforeTimeout() {
SessionPoolOptions.newBuilder()
.setMinSessions(minSessions)
.setMaxSessions(minSessions + 1)
- .setWaitForMinSessions(Duration.ofSeconds(5))
+ .setWaitForMinSessionsDuration(Duration.ofSeconds(5))
.build();
doAnswer(
invocation ->
@@ -2241,7 +2241,7 @@ public void testWaitOnMinSessionsThrowsExceptionWhenTimeoutIsReached() {
SessionPoolOptions.newBuilder()
.setMinSessions(minSessions + 1)
.setMaxSessions(minSessions + 1)
- .setWaitForMinSessions(Duration.ofMillis(100))
+ .setWaitForMinSessionsDuration(Duration.ofMillis(100))
.build();
pool = createPool(new FakeClock(), new FakeMetricRegistry(), SPANNER_DEFAULT_LABEL_VALUES);
pool.maybeWaitOnMinSessions();
diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/SpanExceptionTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/SpanExceptionTest.java
index 2f16cd7c922..d09e65dfc0b 100644
--- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/SpanExceptionTest.java
+++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/SpanExceptionTest.java
@@ -22,6 +22,7 @@
import com.google.cloud.NoCredentials;
import com.google.cloud.spanner.connection.AbstractMockServerTest;
import io.grpc.ManagedChannelBuilder;
+import java.time.Duration;
import java.util.ArrayList;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.ExecutorService;
@@ -31,7 +32,6 @@
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
-import org.threeten.bp.Duration;
@RunWith(JUnit4.class)
public class SpanExceptionTest extends AbstractMockServerTest {
@@ -47,7 +47,7 @@ public void testReadOnlyTransaction() throws InterruptedException, ExecutionExce
.setSessionPoolOption(
SessionPoolOptions.newBuilder()
.setMaxSessions(10)
- .setAcquireSessionTimeout(Duration.ofMillis(10))
+ .setAcquireSessionTimeoutDuration(Duration.ofMillis(10))
// .setAcquireSessionTimeout(null)
.build())
.build()
diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/SpanTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/SpanTest.java
index ffe9e584de3..b87b7ba9752 100644
--- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/SpanTest.java
+++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/SpanTest.java
@@ -45,6 +45,7 @@
import io.opentelemetry.sdk.trace.SdkTracerProvider;
import io.opentelemetry.sdk.trace.export.SimpleSpanProcessor;
import java.lang.reflect.Modifier;
+import java.time.Duration;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ScheduledThreadPoolExecutor;
@@ -58,7 +59,6 @@
import org.junit.experimental.categories.Category;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
-import org.threeten.bp.Duration;
@Category(TracerTest.class)
@RunWith(JUnit4.class)
@@ -202,7 +202,7 @@ public void setUp() throws Exception {
.setSessionPoolOption(
SessionPoolOptions.newBuilder()
.setMinSessions(2)
- .setWaitForMinSessions(Duration.ofSeconds(10))
+ .setWaitForMinSessionsDuration(Duration.ofSeconds(10))
.build());
spanner = builder.build().getService();
@@ -211,21 +211,21 @@ public void setUp() throws Exception {
final RetrySettings retrySettings =
RetrySettings.newBuilder()
- .setInitialRetryDelay(Duration.ofMillis(1L))
- .setMaxRetryDelay(Duration.ofMillis(1L))
- .setInitialRpcTimeout(Duration.ofMillis(75L))
- .setMaxRpcTimeout(Duration.ofMillis(75L))
+ .setInitialRetryDelayDuration(Duration.ofMillis(1L))
+ .setMaxRetryDelayDuration(Duration.ofMillis(1L))
+ .setInitialRpcTimeoutDuration(Duration.ofMillis(75L))
+ .setMaxRpcTimeoutDuration(Duration.ofMillis(75L))
.setMaxAttempts(3)
- .setTotalTimeout(Duration.ofMillis(200L))
+ .setTotalTimeoutDuration(Duration.ofMillis(200L))
.build();
RetrySettings commitRetrySettings =
RetrySettings.newBuilder()
- .setInitialRetryDelay(Duration.ofMillis(1L))
- .setMaxRetryDelay(Duration.ofMillis(1L))
- .setInitialRpcTimeout(Duration.ofMillis(5000L))
- .setMaxRpcTimeout(Duration.ofMillis(10000L))
+ .setInitialRetryDelayDuration(Duration.ofMillis(1L))
+ .setMaxRetryDelayDuration(Duration.ofMillis(1L))
+ .setInitialRpcTimeoutDuration(Duration.ofMillis(5000L))
+ .setMaxRpcTimeoutDuration(Duration.ofMillis(10000L))
.setMaxAttempts(1)
- .setTotalTimeout(Duration.ofMillis(20000L))
+ .setTotalTimeoutDuration(Duration.ofMillis(20000L))
.build();
builder
.getSpannerStubSettingsBuilder()
diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/SpannerCloudMonitoringExporterTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/SpannerCloudMonitoringExporterTest.java
index acb7ae9fa1e..ab30de1ade0 100644
--- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/SpannerCloudMonitoringExporterTest.java
+++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/SpannerCloudMonitoringExporterTest.java
@@ -337,7 +337,7 @@ public void testExportingSumDataInBatches() {
@Test
public void getAggregationTemporality() throws IOException {
SpannerCloudMonitoringExporter actualExporter =
- SpannerCloudMonitoringExporter.create(projectId, null);
+ SpannerCloudMonitoringExporter.create(projectId, null, null);
assertThat(actualExporter.getAggregationTemporality(InstrumentType.COUNTER))
.isEqualTo(AggregationTemporality.CUMULATIVE);
}
@@ -348,7 +348,7 @@ public void testSkipExportingDataIfMissingInstanceId() throws IOException {
Attributes.builder().putAll(attributes).remove(INSTANCE_ID_KEY).build();
SpannerCloudMonitoringExporter actualExporter =
- SpannerCloudMonitoringExporter.create(projectId, null);
+ SpannerCloudMonitoringExporter.create(projectId, null, null);
assertThat(actualExporter.getAggregationTemporality(InstrumentType.COUNTER))
.isEqualTo(AggregationTemporality.CUMULATIVE);
ArgumentCaptor argumentCaptor =
diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/SpannerGaxRetryTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/SpannerGaxRetryTest.java
index 90d76c6a2bb..8ce858e77d7 100644
--- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/SpannerGaxRetryTest.java
+++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/SpannerGaxRetryTest.java
@@ -41,6 +41,7 @@
import io.grpc.inprocess.InProcessServerBuilder;
import io.grpc.protobuf.ProtoUtils;
import java.io.IOException;
+import java.time.Duration;
import java.util.concurrent.ScheduledThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicInteger;
@@ -51,7 +52,6 @@
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
-import org.threeten.bp.Duration;
@RunWith(JUnit4.class)
public class SpannerGaxRetryTest {
@@ -151,7 +151,10 @@ public void setUp() throws Exception {
// wait time is for multiplexed sessions
if (sessionPoolOptions.getUseMultiplexedSession()) {
sessionPoolOptions =
- sessionPoolOptions.toBuilder().setWaitForMinSessions(Duration.ofSeconds(5)).build();
+ sessionPoolOptions
+ .toBuilder()
+ .setWaitForMinSessionsDuration(Duration.ofSeconds(5))
+ .build();
}
builder.setSessionPoolOption(sessionPoolOptions);
// Create one client with default timeout values and one with short timeout values specifically
@@ -161,21 +164,21 @@ public void setUp() throws Exception {
final RetrySettings retrySettings =
RetrySettings.newBuilder()
- .setInitialRetryDelay(Duration.ofMillis(1L))
- .setMaxRetryDelay(Duration.ofMillis(1L))
- .setInitialRpcTimeout(Duration.ofMillis(175L))
- .setMaxRpcTimeout(Duration.ofMillis(175L))
+ .setInitialRetryDelayDuration(Duration.ofMillis(1L))
+ .setMaxRetryDelayDuration(Duration.ofMillis(1L))
+ .setInitialRpcTimeoutDuration(Duration.ofMillis(175L))
+ .setMaxRpcTimeoutDuration(Duration.ofMillis(175L))
.setMaxAttempts(3)
- .setTotalTimeout(Duration.ofMillis(200L))
+ .setTotalTimeoutDuration(Duration.ofMillis(200L))
.build();
RetrySettings commitRetrySettings =
RetrySettings.newBuilder()
- .setInitialRetryDelay(Duration.ofMillis(1L))
- .setMaxRetryDelay(Duration.ofMillis(1L))
- .setInitialRpcTimeout(Duration.ofMillis(5000L))
- .setMaxRpcTimeout(Duration.ofMillis(10000L))
+ .setInitialRetryDelayDuration(Duration.ofMillis(1L))
+ .setMaxRetryDelayDuration(Duration.ofMillis(1L))
+ .setInitialRpcTimeoutDuration(Duration.ofMillis(5000L))
+ .setMaxRpcTimeoutDuration(Duration.ofMillis(10000L))
.setMaxAttempts(1)
- .setTotalTimeout(Duration.ofMillis(20000L))
+ .setTotalTimeoutDuration(Duration.ofMillis(20000L))
.build();
builder
.getSpannerStubSettingsBuilder()
diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/SpannerOptionsTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/SpannerOptionsTest.java
index e8421cd235c..70482c0ffdd 100644
--- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/SpannerOptionsTest.java
+++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/SpannerOptionsTest.java
@@ -66,6 +66,7 @@
import io.opentelemetry.sdk.OpenTelemetrySdk;
import io.opentelemetry.sdk.metrics.SdkMeterProvider;
import io.opentelemetry.sdk.testing.exporter.InMemoryMetricReader;
+import java.time.Duration;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
@@ -82,7 +83,6 @@
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
import org.mockito.Mockito;
-import org.threeten.bp.Duration;
/** Unit tests for {@link com.google.cloud.spanner.SpannerOptions}. */
@RunWith(JUnit4.class)
@@ -151,40 +151,40 @@ public void builder() {
public void testSpannerDefaultRetrySettings() {
RetrySettings witRetryPolicy1 =
RetrySettings.newBuilder()
- .setInitialRetryDelay(Duration.ofMillis(250L))
+ .setInitialRetryDelayDuration(Duration.ofMillis(250L))
.setRetryDelayMultiplier(1.3)
- .setMaxRetryDelay(Duration.ofMillis(32000L))
- .setInitialRpcTimeout(Duration.ofMillis(3600000L))
+ .setMaxRetryDelayDuration(Duration.ofMillis(32000L))
+ .setInitialRpcTimeoutDuration(Duration.ofMillis(3600000L))
.setRpcTimeoutMultiplier(1.0)
- .setMaxRpcTimeout(Duration.ofMillis(3600000L))
- .setTotalTimeout(Duration.ofMillis(3600000L))
+ .setMaxRpcTimeoutDuration(Duration.ofMillis(3600000L))
+ .setTotalTimeoutDuration(Duration.ofMillis(3600000L))
.build();
RetrySettings witRetryPolicy2 =
RetrySettings.newBuilder()
- .setInitialRetryDelay(Duration.ofMillis(250L))
+ .setInitialRetryDelayDuration(Duration.ofMillis(250L))
.setRetryDelayMultiplier(1.3)
- .setMaxRetryDelay(Duration.ofMillis(32000L))
- .setInitialRpcTimeout(Duration.ofMillis(60000L))
+ .setMaxRetryDelayDuration(Duration.ofMillis(32000L))
+ .setInitialRpcTimeoutDuration(Duration.ofMillis(60000L))
.setRpcTimeoutMultiplier(1.0)
- .setMaxRpcTimeout(Duration.ofMillis(60000L))
- .setTotalTimeout(Duration.ofMillis(60000L))
+ .setMaxRpcTimeoutDuration(Duration.ofMillis(60000L))
+ .setTotalTimeoutDuration(Duration.ofMillis(60000L))
.build();
RetrySettings witRetryPolicy3 =
RetrySettings.newBuilder()
- .setInitialRetryDelay(Duration.ofMillis(250L))
+ .setInitialRetryDelayDuration(Duration.ofMillis(250L))
.setRetryDelayMultiplier(1.3)
- .setMaxRetryDelay(Duration.ofMillis(32000L))
- .setInitialRpcTimeout(Duration.ofMillis(30000L))
+ .setMaxRetryDelayDuration(Duration.ofMillis(32000L))
+ .setInitialRpcTimeoutDuration(Duration.ofMillis(30000L))
.setRpcTimeoutMultiplier(1.0)
- .setMaxRpcTimeout(Duration.ofMillis(30000L))
- .setTotalTimeout(Duration.ofMillis(30000L))
+ .setMaxRpcTimeoutDuration(Duration.ofMillis(30000L))
+ .setTotalTimeoutDuration(Duration.ofMillis(30000L))
.build();
RetrySettings noRetry1 =
RetrySettings.newBuilder()
- .setInitialRpcTimeout(Duration.ofMillis(3600000L))
+ .setInitialRpcTimeoutDuration(Duration.ofMillis(3600000L))
.setRpcTimeoutMultiplier(1.0)
- .setMaxRpcTimeout(Duration.ofMillis(3600000L))
- .setTotalTimeout(Duration.ofMillis(3600000L))
+ .setMaxRpcTimeoutDuration(Duration.ofMillis(3600000L))
+ .setTotalTimeoutDuration(Duration.ofMillis(3600000L))
.build();
SpannerOptions options = SpannerOptions.newBuilder().setProjectId("test-project").build();
SpannerStubSettings stubSettings = options.getSpannerStubSettings();
@@ -226,13 +226,13 @@ public void testSpannerDefaultRetrySettings() {
public void testSpannerCustomRetrySettings() {
RetrySettings retrySettings =
RetrySettings.newBuilder()
- .setInitialRetryDelay(Duration.ofSeconds(9999L))
+ .setInitialRetryDelayDuration(Duration.ofSeconds(9999L))
.setRetryDelayMultiplier(9999.99D)
- .setMaxRetryDelay(Duration.ofSeconds(9999L))
- .setInitialRpcTimeout(Duration.ofSeconds(9999L))
+ .setMaxRetryDelayDuration(Duration.ofSeconds(9999L))
+ .setInitialRpcTimeoutDuration(Duration.ofSeconds(9999L))
.setRpcTimeoutMultiplier(9999.99D)
- .setMaxRpcTimeout(Duration.ofSeconds(9999L))
- .setTotalTimeout(Duration.ofSeconds(9999L))
+ .setMaxRpcTimeoutDuration(Duration.ofSeconds(9999L))
+ .setTotalTimeoutDuration(Duration.ofSeconds(9999L))
.build();
SpannerOptions.Builder builder = SpannerOptions.newBuilder().setProjectId("test-project");
SpannerStubSettings.Builder stubSettingsBuilder = builder.getSpannerStubSettingsBuilder();
@@ -294,30 +294,30 @@ public void testSpannerCustomRetrySettings() {
public void testDatabaseAdminDefaultRetrySettings() {
RetrySettings withRetryPolicy1 =
RetrySettings.newBuilder()
- .setInitialRetryDelay(Duration.ofMillis(1000L))
+ .setInitialRetryDelayDuration(Duration.ofMillis(1000L))
.setRetryDelayMultiplier(1.3)
- .setMaxRetryDelay(Duration.ofMillis(32000L))
- .setInitialRpcTimeout(Duration.ofMillis(3600000L))
+ .setMaxRetryDelayDuration(Duration.ofMillis(32000L))
+ .setInitialRpcTimeoutDuration(Duration.ofMillis(3600000L))
.setRpcTimeoutMultiplier(1.0)
- .setMaxRpcTimeout(Duration.ofMillis(3600000L))
- .setTotalTimeout(Duration.ofMillis(3600000L))
+ .setMaxRpcTimeoutDuration(Duration.ofMillis(3600000L))
+ .setTotalTimeoutDuration(Duration.ofMillis(3600000L))
.build();
RetrySettings withRetryPolicy2 =
RetrySettings.newBuilder()
- .setInitialRetryDelay(Duration.ofMillis(1000L))
+ .setInitialRetryDelayDuration(Duration.ofMillis(1000L))
.setRetryDelayMultiplier(1.3)
- .setMaxRetryDelay(Duration.ofMillis(32000L))
- .setInitialRpcTimeout(Duration.ofMillis(30000L))
+ .setMaxRetryDelayDuration(Duration.ofMillis(32000L))
+ .setInitialRpcTimeoutDuration(Duration.ofMillis(30000L))
.setRpcTimeoutMultiplier(1.0)
- .setMaxRpcTimeout(Duration.ofMillis(30000L))
- .setTotalTimeout(Duration.ofMillis(30000L))
+ .setMaxRpcTimeoutDuration(Duration.ofMillis(30000L))
+ .setTotalTimeoutDuration(Duration.ofMillis(30000L))
.build();
RetrySettings noRetryPolicy2 =
RetrySettings.newBuilder()
- .setInitialRpcTimeout(Duration.ofMillis(30000L))
+ .setInitialRpcTimeoutDuration(Duration.ofMillis(30000L))
.setRpcTimeoutMultiplier(1.0)
- .setMaxRpcTimeout(Duration.ofMillis(30000L))
- .setTotalTimeout(Duration.ofMillis(30000L))
+ .setMaxRpcTimeoutDuration(Duration.ofMillis(30000L))
+ .setTotalTimeoutDuration(Duration.ofMillis(30000L))
.build();
SpannerOptions options = SpannerOptions.newBuilder().setProjectId("test-project").build();
DatabaseAdminStubSettings stubSettings = options.getDatabaseAdminStubSettings();
@@ -347,13 +347,13 @@ public void testDatabaseAdminDefaultRetrySettings() {
public void testDatabaseAdminCustomRetrySettings() {
RetrySettings retrySettings =
RetrySettings.newBuilder()
- .setInitialRetryDelay(Duration.ofSeconds(9999L))
+ .setInitialRetryDelayDuration(Duration.ofSeconds(9999L))
.setRetryDelayMultiplier(9999.99D)
- .setMaxRetryDelay(Duration.ofSeconds(9999L))
- .setInitialRpcTimeout(Duration.ofSeconds(9999L))
+ .setMaxRetryDelayDuration(Duration.ofSeconds(9999L))
+ .setInitialRpcTimeoutDuration(Duration.ofSeconds(9999L))
.setRpcTimeoutMultiplier(9999.99D)
- .setMaxRpcTimeout(Duration.ofSeconds(9999L))
- .setTotalTimeout(Duration.ofSeconds(9999L))
+ .setMaxRpcTimeoutDuration(Duration.ofSeconds(9999L))
+ .setTotalTimeoutDuration(Duration.ofSeconds(9999L))
.build();
SpannerOptions.Builder builder = SpannerOptions.newBuilder().setProjectId("test-project");
DatabaseAdminStubSettings.Builder stubSettingsBuilder =
@@ -384,37 +384,37 @@ public void testDatabaseAdminCustomRetrySettings() {
public void testInstanceAdminDefaultRetrySettings() {
RetrySettings withRetryPolicy1 =
RetrySettings.newBuilder()
- .setInitialRetryDelay(Duration.ofMillis(1000L))
+ .setInitialRetryDelayDuration(Duration.ofMillis(1000L))
.setRetryDelayMultiplier(1.3)
- .setMaxRetryDelay(Duration.ofMillis(32000L))
- .setInitialRpcTimeout(Duration.ofMillis(3600000L))
+ .setMaxRetryDelayDuration(Duration.ofMillis(32000L))
+ .setInitialRpcTimeoutDuration(Duration.ofMillis(3600000L))
.setRpcTimeoutMultiplier(1.0)
- .setMaxRpcTimeout(Duration.ofMillis(3600000L))
- .setTotalTimeout(Duration.ofMillis(3600000L))
+ .setMaxRpcTimeoutDuration(Duration.ofMillis(3600000L))
+ .setTotalTimeoutDuration(Duration.ofMillis(3600000L))
.build();
RetrySettings withRetryPolicy2 =
RetrySettings.newBuilder()
- .setInitialRetryDelay(Duration.ofMillis(1000L))
+ .setInitialRetryDelayDuration(Duration.ofMillis(1000L))
.setRetryDelayMultiplier(1.3)
- .setMaxRetryDelay(Duration.ofMillis(32000L))
- .setInitialRpcTimeout(Duration.ofMillis(30000L))
+ .setMaxRetryDelayDuration(Duration.ofMillis(32000L))
+ .setInitialRpcTimeoutDuration(Duration.ofMillis(30000L))
.setRpcTimeoutMultiplier(1.0)
- .setMaxRpcTimeout(Duration.ofMillis(30000L))
- .setTotalTimeout(Duration.ofMillis(30000L))
+ .setMaxRpcTimeoutDuration(Duration.ofMillis(30000L))
+ .setTotalTimeoutDuration(Duration.ofMillis(30000L))
.build();
RetrySettings noRetryPolicy1 =
RetrySettings.newBuilder()
- .setInitialRpcTimeout(Duration.ofMillis(3600000L))
+ .setInitialRpcTimeoutDuration(Duration.ofMillis(3600000L))
.setRpcTimeoutMultiplier(1.0)
- .setMaxRpcTimeout(Duration.ofMillis(3600000L))
- .setTotalTimeout(Duration.ofMillis(3600000L))
+ .setMaxRpcTimeoutDuration(Duration.ofMillis(3600000L))
+ .setTotalTimeoutDuration(Duration.ofMillis(3600000L))
.build();
RetrySettings noRetryPolicy2 =
RetrySettings.newBuilder()
- .setInitialRpcTimeout(Duration.ofMillis(30000L))
+ .setInitialRpcTimeoutDuration(Duration.ofMillis(30000L))
.setRpcTimeoutMultiplier(1.0)
- .setMaxRpcTimeout(Duration.ofMillis(30000L))
- .setTotalTimeout(Duration.ofMillis(30000L))
+ .setMaxRpcTimeoutDuration(Duration.ofMillis(30000L))
+ .setTotalTimeoutDuration(Duration.ofMillis(30000L))
.build();
SpannerOptions options = SpannerOptions.newBuilder().setProjectId("test-project").build();
InstanceAdminStubSettings stubSettings = options.getInstanceAdminStubSettings();
@@ -451,13 +451,13 @@ public void testInstanceAdminDefaultRetrySettings() {
public void testInstanceAdminCustomRetrySettings() {
RetrySettings retrySettings =
RetrySettings.newBuilder()
- .setInitialRetryDelay(Duration.ofSeconds(9999L))
+ .setInitialRetryDelayDuration(Duration.ofSeconds(9999L))
.setRetryDelayMultiplier(9999.99D)
- .setMaxRetryDelay(Duration.ofSeconds(9999L))
- .setInitialRpcTimeout(Duration.ofSeconds(9999L))
+ .setMaxRetryDelayDuration(Duration.ofSeconds(9999L))
+ .setInitialRpcTimeoutDuration(Duration.ofSeconds(9999L))
.setRpcTimeoutMultiplier(9999.99D)
- .setMaxRpcTimeout(Duration.ofSeconds(9999L))
- .setTotalTimeout(Duration.ofSeconds(9999L))
+ .setMaxRpcTimeoutDuration(Duration.ofSeconds(9999L))
+ .setTotalTimeoutDuration(Duration.ofSeconds(9999L))
.build();
SpannerOptions.Builder builder = SpannerOptions.newBuilder().setProjectId("test-project");
InstanceAdminStubSettings.Builder stubSettingsBuilder =
@@ -738,7 +738,7 @@ public void testLeaderAwareRoutingEnablement() {
@Test
public void testEndToEndTracingEnablement() {
- // Test that end to end tracing is disabled by default.
+ // Test that end-to-end tracing is disabled by default.
assertFalse(SpannerOptions.newBuilder().setProjectId("p").build().isEndToEndTracingEnabled());
assertTrue(
SpannerOptions.newBuilder()
@@ -754,6 +754,19 @@ public void testEndToEndTracingEnablement() {
.isEndToEndTracingEnabled());
}
+ @Test
+ public void testMonitoringHost() {
+ String metricsEndpoint = "test-endpoint:443";
+ assertNull(SpannerOptions.newBuilder().setProjectId("p").build().getMonitoringHost());
+ assertThat(
+ SpannerOptions.newBuilder()
+ .setProjectId("p")
+ .setMonitoringHost(metricsEndpoint)
+ .build()
+ .getMonitoringHost())
+ .isEqualTo(metricsEndpoint);
+ }
+
@Test
public void testSetDirectedReadOptions() {
final DirectedReadOptions directedReadOptions =
@@ -866,14 +879,14 @@ public void testSpannerCallContextTimeoutConfigurator_NullValues() {
public void testSpannerCallContextTimeoutConfigurator_WithTimeouts() {
SpannerCallContextTimeoutConfigurator configurator =
SpannerCallContextTimeoutConfigurator.create();
- configurator.withBatchUpdateTimeout(Duration.ofSeconds(1L));
- configurator.withCommitTimeout(Duration.ofSeconds(2L));
- configurator.withExecuteQueryTimeout(Duration.ofSeconds(3L));
- configurator.withExecuteUpdateTimeout(Duration.ofSeconds(4L));
- configurator.withPartitionQueryTimeout(Duration.ofSeconds(5L));
- configurator.withPartitionReadTimeout(Duration.ofSeconds(6L));
- configurator.withReadTimeout(Duration.ofSeconds(7L));
- configurator.withRollbackTimeout(Duration.ofSeconds(8L));
+ configurator.withBatchUpdateTimeoutDuration(Duration.ofSeconds(1L));
+ configurator.withCommitTimeoutDuration(Duration.ofSeconds(2L));
+ configurator.withExecuteQueryTimeoutDuration(Duration.ofSeconds(3L));
+ configurator.withExecuteUpdateTimeoutDuration(Duration.ofSeconds(4L));
+ configurator.withPartitionQueryTimeoutDuration(Duration.ofSeconds(5L));
+ configurator.withPartitionReadTimeoutDuration(Duration.ofSeconds(6L));
+ configurator.withReadTimeoutDuration(Duration.ofSeconds(7L));
+ configurator.withRollbackTimeoutDuration(Duration.ofSeconds(8L));
ApiCallContext inputCallContext = GrpcCallContext.createDefault();
@@ -919,7 +932,7 @@ public void testSpannerCallContextTimeoutConfigurator_WithTimeouts() {
inputCallContext,
CommitRequest.getDefaultInstance(),
SpannerGrpc.getCommitMethod())
- .getTimeout())
+ .getTimeoutDuration())
.isEqualTo(Duration.ofSeconds(2L));
assertThat(
configurator
@@ -927,7 +940,7 @@ public void testSpannerCallContextTimeoutConfigurator_WithTimeouts() {
inputCallContext,
RollbackRequest.getDefaultInstance(),
SpannerGrpc.getRollbackMethod())
- .getTimeout())
+ .getTimeoutDuration())
.isEqualTo(Duration.ofSeconds(8L));
assertNull(
@@ -941,7 +954,7 @@ public void testSpannerCallContextTimeoutConfigurator_WithTimeouts() {
inputCallContext,
ExecuteSqlRequest.getDefaultInstance(),
SpannerGrpc.getExecuteStreamingSqlMethod())
- .getTimeout())
+ .getTimeoutDuration())
.isEqualTo(Duration.ofSeconds(3L));
assertThat(
configurator
@@ -949,7 +962,7 @@ public void testSpannerCallContextTimeoutConfigurator_WithTimeouts() {
inputCallContext,
ExecuteBatchDmlRequest.getDefaultInstance(),
SpannerGrpc.getExecuteBatchDmlMethod())
- .getTimeout())
+ .getTimeoutDuration())
.isEqualTo(Duration.ofSeconds(1L));
assertNull(
configurator.configure(
@@ -960,7 +973,7 @@ public void testSpannerCallContextTimeoutConfigurator_WithTimeouts() {
inputCallContext,
ReadRequest.getDefaultInstance(),
SpannerGrpc.getStreamingReadMethod())
- .getTimeout())
+ .getTimeoutDuration())
.isEqualTo(Duration.ofSeconds(7L));
assertThat(
@@ -969,7 +982,7 @@ public void testSpannerCallContextTimeoutConfigurator_WithTimeouts() {
inputCallContext,
PartitionQueryRequest.getDefaultInstance(),
SpannerGrpc.getPartitionQueryMethod())
- .getTimeout())
+ .getTimeoutDuration())
.isEqualTo(Duration.ofSeconds(5L));
assertThat(
configurator
@@ -977,7 +990,7 @@ public void testSpannerCallContextTimeoutConfigurator_WithTimeouts() {
inputCallContext,
PartitionReadRequest.getDefaultInstance(),
SpannerGrpc.getPartitionReadMethod())
- .getTimeout())
+ .getTimeoutDuration())
.isEqualTo(Duration.ofSeconds(6L));
}
diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/admin/instance/v1/InstanceAdminClientHttpJsonTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/admin/instance/v1/InstanceAdminClientHttpJsonTest.java
index 50532826e53..c85b9c5297c 100644
--- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/admin/instance/v1/InstanceAdminClientHttpJsonTest.java
+++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/admin/instance/v1/InstanceAdminClientHttpJsonTest.java
@@ -45,6 +45,7 @@
import com.google.protobuf.FieldMask;
import com.google.protobuf.Timestamp;
import com.google.spanner.admin.instance.v1.AutoscalingConfig;
+import com.google.spanner.admin.instance.v1.FreeInstanceMetadata;
import com.google.spanner.admin.instance.v1.Instance;
import com.google.spanner.admin.instance.v1.InstanceConfig;
import com.google.spanner.admin.instance.v1.InstanceConfigName;
@@ -223,6 +224,7 @@ public void getInstanceConfigTest() throws Exception {
.setEtag("etag3123477")
.addAllLeaderOptions(new ArrayList())
.setReconciling(true)
+ .setStorageLimitPerProcessingUnit(-1769187130)
.build();
mockService.addResponse(expectedResponse);
@@ -275,6 +277,7 @@ public void getInstanceConfigTest2() throws Exception {
.setEtag("etag3123477")
.addAllLeaderOptions(new ArrayList())
.setReconciling(true)
+ .setStorageLimitPerProcessingUnit(-1769187130)
.build();
mockService.addResponse(expectedResponse);
@@ -327,6 +330,7 @@ public void createInstanceConfigTest() throws Exception {
.setEtag("etag3123477")
.addAllLeaderOptions(new ArrayList())
.setReconciling(true)
+ .setStorageLimitPerProcessingUnit(-1769187130)
.build();
Operation resultOperation =
Operation.newBuilder()
@@ -389,6 +393,7 @@ public void createInstanceConfigTest2() throws Exception {
.setEtag("etag3123477")
.addAllLeaderOptions(new ArrayList())
.setReconciling(true)
+ .setStorageLimitPerProcessingUnit(-1769187130)
.build();
Operation resultOperation =
Operation.newBuilder()
@@ -451,6 +456,7 @@ public void updateInstanceConfigTest() throws Exception {
.setEtag("etag3123477")
.addAllLeaderOptions(new ArrayList())
.setReconciling(true)
+ .setStorageLimitPerProcessingUnit(-1769187130)
.build();
Operation resultOperation =
Operation.newBuilder()
@@ -471,6 +477,7 @@ public void updateInstanceConfigTest() throws Exception {
.setEtag("etag3123477")
.addAllLeaderOptions(new ArrayList())
.setReconciling(true)
+ .setStorageLimitPerProcessingUnit(-1769187130)
.build();
FieldMask updateMask = FieldMask.newBuilder().build();
@@ -512,6 +519,7 @@ public void updateInstanceConfigExceptionTest() throws Exception {
.setEtag("etag3123477")
.addAllLeaderOptions(new ArrayList())
.setReconciling(true)
+ .setStorageLimitPerProcessingUnit(-1769187130)
.build();
FieldMask updateMask = FieldMask.newBuilder().build();
client.updateInstanceConfigAsync(instanceConfig, updateMask).get();
@@ -917,6 +925,7 @@ public void getInstanceTest() throws Exception {
.addAllEndpointUris(new ArrayList())
.setCreateTime(Timestamp.newBuilder().build())
.setUpdateTime(Timestamp.newBuilder().build())
+ .setFreeInstanceMetadata(FreeInstanceMetadata.newBuilder().build())
.build();
mockService.addResponse(expectedResponse);
@@ -971,6 +980,7 @@ public void getInstanceTest2() throws Exception {
.addAllEndpointUris(new ArrayList())
.setCreateTime(Timestamp.newBuilder().build())
.setUpdateTime(Timestamp.newBuilder().build())
+ .setFreeInstanceMetadata(FreeInstanceMetadata.newBuilder().build())
.build();
mockService.addResponse(expectedResponse);
@@ -1025,6 +1035,7 @@ public void createInstanceTest() throws Exception {
.addAllEndpointUris(new ArrayList())
.setCreateTime(Timestamp.newBuilder().build())
.setUpdateTime(Timestamp.newBuilder().build())
+ .setFreeInstanceMetadata(FreeInstanceMetadata.newBuilder().build())
.build();
Operation resultOperation =
Operation.newBuilder()
@@ -1088,6 +1099,7 @@ public void createInstanceTest2() throws Exception {
.addAllEndpointUris(new ArrayList())
.setCreateTime(Timestamp.newBuilder().build())
.setUpdateTime(Timestamp.newBuilder().build())
+ .setFreeInstanceMetadata(FreeInstanceMetadata.newBuilder().build())
.build();
Operation resultOperation =
Operation.newBuilder()
@@ -1151,6 +1163,7 @@ public void updateInstanceTest() throws Exception {
.addAllEndpointUris(new ArrayList())
.setCreateTime(Timestamp.newBuilder().build())
.setUpdateTime(Timestamp.newBuilder().build())
+ .setFreeInstanceMetadata(FreeInstanceMetadata.newBuilder().build())
.build();
Operation resultOperation =
Operation.newBuilder()
@@ -1173,6 +1186,7 @@ public void updateInstanceTest() throws Exception {
.addAllEndpointUris(new ArrayList())
.setCreateTime(Timestamp.newBuilder().build())
.setUpdateTime(Timestamp.newBuilder().build())
+ .setFreeInstanceMetadata(FreeInstanceMetadata.newBuilder().build())
.build();
FieldMask fieldMask = FieldMask.newBuilder().build();
@@ -1215,6 +1229,7 @@ public void updateInstanceExceptionTest() throws Exception {
.addAllEndpointUris(new ArrayList())
.setCreateTime(Timestamp.newBuilder().build())
.setUpdateTime(Timestamp.newBuilder().build())
+ .setFreeInstanceMetadata(FreeInstanceMetadata.newBuilder().build())
.build();
FieldMask fieldMask = FieldMask.newBuilder().build();
client.updateInstanceAsync(instance, fieldMask).get();
diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/admin/instance/v1/InstanceAdminClientTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/admin/instance/v1/InstanceAdminClientTest.java
index 73c6de9b2ca..7c62ef03883 100644
--- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/admin/instance/v1/InstanceAdminClientTest.java
+++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/admin/instance/v1/InstanceAdminClientTest.java
@@ -53,6 +53,7 @@
import com.google.spanner.admin.instance.v1.DeleteInstanceConfigRequest;
import com.google.spanner.admin.instance.v1.DeleteInstancePartitionRequest;
import com.google.spanner.admin.instance.v1.DeleteInstanceRequest;
+import com.google.spanner.admin.instance.v1.FreeInstanceMetadata;
import com.google.spanner.admin.instance.v1.GetInstanceConfigRequest;
import com.google.spanner.admin.instance.v1.GetInstancePartitionRequest;
import com.google.spanner.admin.instance.v1.GetInstanceRequest;
@@ -235,6 +236,7 @@ public void getInstanceConfigTest() throws Exception {
.setEtag("etag3123477")
.addAllLeaderOptions(new ArrayList())
.setReconciling(true)
+ .setStorageLimitPerProcessingUnit(-1769187130)
.build();
mockInstanceAdmin.addResponse(expectedResponse);
@@ -281,6 +283,7 @@ public void getInstanceConfigTest2() throws Exception {
.setEtag("etag3123477")
.addAllLeaderOptions(new ArrayList())
.setReconciling(true)
+ .setStorageLimitPerProcessingUnit(-1769187130)
.build();
mockInstanceAdmin.addResponse(expectedResponse);
@@ -327,6 +330,7 @@ public void createInstanceConfigTest() throws Exception {
.setEtag("etag3123477")
.addAllLeaderOptions(new ArrayList())
.setReconciling(true)
+ .setStorageLimitPerProcessingUnit(-1769187130)
.build();
Operation resultOperation =
Operation.newBuilder()
@@ -389,6 +393,7 @@ public void createInstanceConfigTest2() throws Exception {
.setEtag("etag3123477")
.addAllLeaderOptions(new ArrayList())
.setReconciling(true)
+ .setStorageLimitPerProcessingUnit(-1769187130)
.build();
Operation resultOperation =
Operation.newBuilder()
@@ -451,6 +456,7 @@ public void updateInstanceConfigTest() throws Exception {
.setEtag("etag3123477")
.addAllLeaderOptions(new ArrayList())
.setReconciling(true)
+ .setStorageLimitPerProcessingUnit(-1769187130)
.build();
Operation resultOperation =
Operation.newBuilder()
@@ -852,6 +858,7 @@ public void getInstanceTest() throws Exception {
.addAllEndpointUris(new ArrayList())
.setCreateTime(Timestamp.newBuilder().build())
.setUpdateTime(Timestamp.newBuilder().build())
+ .setFreeInstanceMetadata(FreeInstanceMetadata.newBuilder().build())
.build();
mockInstanceAdmin.addResponse(expectedResponse);
@@ -900,6 +907,7 @@ public void getInstanceTest2() throws Exception {
.addAllEndpointUris(new ArrayList())
.setCreateTime(Timestamp.newBuilder().build())
.setUpdateTime(Timestamp.newBuilder().build())
+ .setFreeInstanceMetadata(FreeInstanceMetadata.newBuilder().build())
.build();
mockInstanceAdmin.addResponse(expectedResponse);
@@ -948,6 +956,7 @@ public void createInstanceTest() throws Exception {
.addAllEndpointUris(new ArrayList())
.setCreateTime(Timestamp.newBuilder().build())
.setUpdateTime(Timestamp.newBuilder().build())
+ .setFreeInstanceMetadata(FreeInstanceMetadata.newBuilder().build())
.build();
Operation resultOperation =
Operation.newBuilder()
@@ -1010,6 +1019,7 @@ public void createInstanceTest2() throws Exception {
.addAllEndpointUris(new ArrayList())
.setCreateTime(Timestamp.newBuilder().build())
.setUpdateTime(Timestamp.newBuilder().build())
+ .setFreeInstanceMetadata(FreeInstanceMetadata.newBuilder().build())
.build();
Operation resultOperation =
Operation.newBuilder()
@@ -1072,6 +1082,7 @@ public void updateInstanceTest() throws Exception {
.addAllEndpointUris(new ArrayList())
.setCreateTime(Timestamp.newBuilder().build())
.setUpdateTime(Timestamp.newBuilder().build())
+ .setFreeInstanceMetadata(FreeInstanceMetadata.newBuilder().build())
.build();
Operation resultOperation =
Operation.newBuilder()
diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/AbstractMockServerTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/AbstractMockServerTest.java
index 375fdda2a95..fa3ab00b138 100644
--- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/AbstractMockServerTest.java
+++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/AbstractMockServerTest.java
@@ -283,6 +283,7 @@ ITConnection createConnection(
ConnectionOptions.newBuilder()
.setUri(getBaseUrl() + additionalUrlOptions)
.setStatementExecutionInterceptors(interceptors);
+ configureConnectionOptions(builder);
ConnectionOptions options = builder.build();
ITConnection connection = createITConnection(options);
for (TransactionRetryListener listener : transactionRetryListeners) {
@@ -291,6 +292,11 @@ ITConnection createConnection(
return connection;
}
+ protected ConnectionOptions.Builder configureConnectionOptions(
+ ConnectionOptions.Builder builder) {
+ return builder;
+ }
+
protected String getBaseUrl() {
return String.format(
"cloudspanner://localhost:%d/projects/proj/instances/inst/databases/db?usePlainText=true;autocommit=false;retryAbortsInternally=true",
diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/ConnectionAsyncApiAbortedTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/ConnectionAsyncApiAbortedTest.java
index 97d745edd7f..1f4378ecd86 100644
--- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/ConnectionAsyncApiAbortedTest.java
+++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/ConnectionAsyncApiAbortedTest.java
@@ -32,7 +32,9 @@
import com.google.cloud.spanner.Options;
import com.google.cloud.spanner.SpannerExceptionFactory;
import com.google.cloud.spanner.Statement;
+import com.google.cloud.spanner.connection.ConnectionOptions.Builder;
import com.google.cloud.spanner.connection.ITAbstractSpannerTest.ITConnection;
+import com.google.cloud.spanner.connection.StatementExecutor.StatementExecutorType;
import com.google.common.collect.Collections2;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.Lists;
@@ -127,6 +129,11 @@ ITConnection createConnection(TransactionRetryListener listener) {
return connection;
}
+ @Override
+ protected Builder configureConnectionOptions(Builder builder) {
+ return builder.setStatementExecutorType(StatementExecutorType.PLATFORM_THREAD);
+ }
+
@Test
public void testSingleQueryAborted() {
RetryCounter counter = new RetryCounter();
diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/ConnectionAsyncApiTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/ConnectionAsyncApiTest.java
index 21fe086d4f8..c6777da5b51 100644
--- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/ConnectionAsyncApiTest.java
+++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/ConnectionAsyncApiTest.java
@@ -36,7 +36,9 @@
import com.google.cloud.spanner.SpannerApiFutures;
import com.google.cloud.spanner.SpannerException;
import com.google.cloud.spanner.Statement;
+import com.google.cloud.spanner.connection.ConnectionOptions.Builder;
import com.google.cloud.spanner.connection.SpannerPool.CheckAndCloseSpannersMode;
+import com.google.cloud.spanner.connection.StatementExecutor.StatementExecutorType;
import com.google.cloud.spanner.connection.StatementResult.ResultType;
import com.google.common.base.Function;
import com.google.common.collect.Collections2;
@@ -86,6 +88,11 @@ public void setup() {
}
}
+ @Override
+ protected Builder configureConnectionOptions(Builder builder) {
+ return builder.setStatementExecutorType(StatementExecutorType.PLATFORM_THREAD);
+ }
+
@After
public void reset() {
mockSpanner.removeAllExecutionTimes();
diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/ConnectionOptionsTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/ConnectionOptionsTest.java
index f826ec08dfc..69c4a010327 100644
--- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/ConnectionOptionsTest.java
+++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/ConnectionOptionsTest.java
@@ -16,6 +16,7 @@
package com.google.cloud.spanner.connection;
+import static com.google.cloud.spanner.connection.ConnectionOptions.Builder.EXTERNAL_HOST_PATTERN;
import static com.google.cloud.spanner.connection.ConnectionOptions.Builder.SPANNER_URI_PATTERN;
import static com.google.cloud.spanner.connection.ConnectionOptions.DEFAULT_ENDPOINT;
import static com.google.cloud.spanner.connection.ConnectionOptions.determineHost;
@@ -1211,4 +1212,40 @@ public void testEnableApiTracing() {
.build()
.isEnableApiTracing());
}
+
+ @Test
+ public void testExternalHostPatterns() {
+ Matcher matcherWithoutInstance =
+ EXTERNAL_HOST_PATTERN.matcher("cloudspanner://localhost:15000/databases/test-db");
+ assertTrue(matcherWithoutInstance.matches());
+ assertNull(matcherWithoutInstance.group("INSTANCEGROUP"));
+ assertEquals("test-db", matcherWithoutInstance.group("DATABASEGROUP"));
+ Matcher matcherWithProperty =
+ EXTERNAL_HOST_PATTERN.matcher(
+ "cloudspanner://localhost:15000/instances/default/databases/singers-db?usePlainText=true");
+ assertTrue(matcherWithProperty.matches());
+ assertEquals("default", matcherWithProperty.group("INSTANCEGROUP"));
+ assertEquals("singers-db", matcherWithProperty.group("DATABASEGROUP"));
+ Matcher matcherWithoutPort =
+ EXTERNAL_HOST_PATTERN.matcher(
+ "cloudspanner://localhost/instances/default/databases/test-db");
+ assertTrue(matcherWithoutPort.matches());
+ assertEquals("default", matcherWithoutPort.group("INSTANCEGROUP"));
+ assertEquals("test-db", matcherWithoutPort.group("DATABASEGROUP"));
+ assertEquals(
+ "http://localhost:15000",
+ determineHost(
+ matcherWithoutPort,
+ DEFAULT_ENDPOINT,
+ /* autoConfigEmulator= */ true,
+ /* usePlainText= */ true,
+ ImmutableMap.of()));
+ Matcher matcherWithProject =
+ EXTERNAL_HOST_PATTERN.matcher(
+ "cloudspanner://localhost:15000/projects/default/instances/default/databases/singers-db");
+ assertFalse(matcherWithProject.matches());
+ Matcher matcherWithoutHost =
+ EXTERNAL_HOST_PATTERN.matcher("cloudspanner:/instances/default/databases/singers-db");
+ assertFalse(matcherWithoutHost.matches());
+ }
}
diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/ConnectionStateMockServerTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/ConnectionStateMockServerTest.java
index ea79a7132bf..4c9397a6714 100644
--- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/ConnectionStateMockServerTest.java
+++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/ConnectionStateMockServerTest.java
@@ -19,10 +19,15 @@
import static com.google.cloud.spanner.connection.ConnectionProperties.CONNECTION_STATE_TYPE;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertThrows;
import static org.junit.Assert.assertTrue;
+import static org.junit.Assume.assumeTrue;
import com.google.cloud.spanner.Dialect;
+import com.google.cloud.spanner.ErrorCode;
import com.google.cloud.spanner.MockSpannerServiceImpl.StatementResult;
+import com.google.cloud.spanner.SpannerException;
+import com.google.cloud.spanner.Statement;
import com.google.cloud.spanner.connection.ConnectionState.Type;
import com.google.cloud.spanner.connection.ITAbstractSpannerTest.ITConnection;
import org.junit.After;
@@ -84,6 +89,10 @@ ITConnection createConnection(ConnectionState.Type type) {
return createConnection(";" + CONNECTION_STATE_TYPE.getKey() + "=" + type.name());
}
+ String getPrefix() {
+ return dialect == Dialect.POSTGRESQL ? "SPANNER." : "";
+ }
+
@Test
public void testConnectionStateType() {
try (Connection connection = createConnection()) {
@@ -228,4 +237,58 @@ public void testLocalChangeIsLostAfterTransaction() {
}
}
}
+
+ @Test
+ public void testSetLocalWithSqlStatement() {
+ try (Connection connection = createConnection()) {
+ connection.setAutocommit(false);
+
+ assertTrue(connection.isRetryAbortsInternally());
+ connection.execute(
+ Statement.of(String.format("set local %sretry_aborts_internally=false", getPrefix())));
+ assertFalse(connection.isRetryAbortsInternally());
+ connection.commit();
+ assertTrue(connection.isRetryAbortsInternally());
+ }
+ }
+
+ @Test
+ public void testSetSessionWithSqlStatement() {
+ assumeTrue("Only PostgreSQL supports the 'session' keyword", dialect == Dialect.POSTGRESQL);
+
+ try (Connection connection = createConnection()) {
+ connection.setAutocommit(false);
+
+ assertTrue(connection.isRetryAbortsInternally());
+ connection.execute(
+ Statement.of(String.format("set session %sretry_aborts_internally=false", getPrefix())));
+ assertFalse(connection.isRetryAbortsInternally());
+ connection.commit();
+ assertFalse(connection.isRetryAbortsInternally());
+ }
+ }
+
+ @Test
+ public void testSetLocalInvalidValue() {
+ try (Connection connection = createConnection()) {
+ connection.setAutocommit(false);
+
+ assertTrue(connection.isRetryAbortsInternally());
+ SpannerException exception =
+ assertThrows(
+ SpannerException.class,
+ () ->
+ connection.execute(
+ Statement.of(
+ String.format("set local %sretry_aborts_internally=foo", getPrefix()))));
+ assertEquals(ErrorCode.INVALID_ARGUMENT, exception.getErrorCode());
+ assertTrue(
+ exception.getMessage(),
+ exception
+ .getMessage()
+ .endsWith(
+ String.format("Unknown value for %sRETRY_ABORTS_INTERNALLY: foo", getPrefix())));
+ assertTrue(connection.isRetryAbortsInternally());
+ }
+ }
}
diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/ConnectionTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/ConnectionTest.java
index c5b34982255..9ae174bd403 100644
--- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/ConnectionTest.java
+++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/ConnectionTest.java
@@ -36,6 +36,8 @@
import com.google.cloud.spanner.SpannerOptions;
import com.google.cloud.spanner.Statement;
import com.google.cloud.spanner.TimestampBound;
+import com.google.cloud.spanner.connection.ConnectionOptions.Builder;
+import com.google.cloud.spanner.connection.StatementExecutor.StatementExecutorType;
import com.google.common.collect.ImmutableList;
import com.google.spanner.v1.BatchCreateSessionsRequest;
import com.google.spanner.v1.CommitRequest;
@@ -417,6 +419,11 @@ protected String getBaseUrl() {
return super.getBaseUrl() + ";maxSessions=1";
}
+ @Override
+ protected Builder configureConnectionOptions(Builder builder) {
+ return builder.setStatementExecutorType(StatementExecutorType.PLATFORM_THREAD);
+ }
+
@Test
public void testMaxSessions()
throws InterruptedException, TimeoutException, ExecutionException {
diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/StatementTimeoutTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/StatementTimeoutTest.java
index 24817c84450..a50fb98f1e3 100644
--- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/StatementTimeoutTest.java
+++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/StatementTimeoutTest.java
@@ -23,6 +23,7 @@
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertThrows;
import static org.junit.Assert.assertTrue;
+import static org.junit.Assume.assumeFalse;
import com.google.api.core.SettableApiFuture;
import com.google.api.gax.longrunning.OperationTimedPollAlgorithm;
@@ -35,6 +36,7 @@
import com.google.cloud.spanner.Statement;
import com.google.cloud.spanner.connection.AbstractConnectionImplTest.ConnectionConsumer;
import com.google.cloud.spanner.connection.ITAbstractSpannerTest.ITConnection;
+import com.google.cloud.spanner.connection.StatementExecutor.StatementExecutorType;
import com.google.common.base.Stopwatch;
import com.google.common.collect.Collections2;
import com.google.longrunning.Operation;
@@ -46,6 +48,7 @@
import com.google.spanner.v1.CommitRequest;
import com.google.spanner.v1.ExecuteSqlRequest;
import io.grpc.Status;
+import java.time.Duration;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.ExecutorService;
@@ -57,10 +60,11 @@
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
-import org.junit.runners.JUnit4;
-import org.threeten.bp.Duration;
+import org.junit.runners.Parameterized;
+import org.junit.runners.Parameterized.Parameter;
+import org.junit.runners.Parameterized.Parameters;
-@RunWith(JUnit4.class)
+@RunWith(Parameterized.class)
public class StatementTimeoutTest extends AbstractMockServerTest {
private static final String SLOW_SELECT = "SELECT foo FROM bar";
@@ -85,10 +89,18 @@ public class StatementTimeoutTest extends AbstractMockServerTest {
*/
private static final int TIMEOUT_FOR_SLOW_STATEMENTS = 50;
+ @Parameters(name = "statementExecutorType = {0}")
+ public static Object[] parameters() {
+ return StatementExecutorType.values();
+ }
+
+ @Parameter public StatementExecutorType statementExecutorType;
+
protected ITConnection createConnection() {
ConnectionOptions options =
ConnectionOptions.newBuilder()
.setUri(getBaseUrl() + ";trackSessionLeaks=false")
+ .setStatementExecutorType(statementExecutorType)
.setConfigurator(
optionsConfigurator ->
optionsConfigurator
@@ -97,10 +109,10 @@ protected ITConnection createConnection() {
.setPollingAlgorithm(
OperationTimedPollAlgorithm.create(
RetrySettings.newBuilder()
- .setInitialRetryDelay(Duration.ofMillis(1L))
- .setMaxRetryDelay(Duration.ofMillis(1L))
+ .setInitialRetryDelayDuration(Duration.ofMillis(1L))
+ .setMaxRetryDelayDuration(Duration.ofMillis(1L))
.setRetryDelayMultiplier(1.0)
- .setTotalTimeout(Duration.ofMinutes(10L))
+ .setTotalTimeoutDuration(Duration.ofMinutes(10L))
.build())))
.build();
return createITConnection(options);
@@ -618,6 +630,10 @@ private void waitForDdlRequestOnServer() {
@Test
public void testCancelReadOnlyAutocommit() {
+ assumeFalse(
+ "Direct executor does not yet support cancelling statements",
+ statementExecutorType == StatementExecutorType.DIRECT_EXECUTOR);
+
mockSpanner.setExecuteStreamingSqlExecutionTime(
SimulatedExecutionTime.ofMinimumAndRandomTime(EXECUTION_TIME_SLOW_STATEMENT, 0));
@@ -643,6 +659,10 @@ public void testCancelReadOnlyAutocommit() {
@Test
public void testCancelReadOnlyAutocommitMultipleStatements() {
+ assumeFalse(
+ "Direct executor does not yet support cancelling statements",
+ statementExecutorType == StatementExecutorType.DIRECT_EXECUTOR);
+
mockSpanner.setExecuteStreamingSqlExecutionTime(
SimulatedExecutionTime.ofMinimumAndRandomTime(EXECUTION_TIME_SLOW_STATEMENT, 0));
@@ -675,6 +695,10 @@ public void testCancelReadOnlyAutocommitMultipleStatements() {
@Test
public void testCancelReadOnlyTransactional() {
+ assumeFalse(
+ "Direct executor does not yet support cancelling statements",
+ statementExecutorType == StatementExecutorType.DIRECT_EXECUTOR);
+
mockSpanner.setExecuteStreamingSqlExecutionTime(
SimulatedExecutionTime.ofMinimumAndRandomTime(EXECUTION_TIME_SLOW_STATEMENT, 0));
@@ -700,6 +724,10 @@ public void testCancelReadOnlyTransactional() {
@Test
public void testCancelReadOnlyTransactionalMultipleStatements() {
+ assumeFalse(
+ "Direct executor does not yet support cancelling statements",
+ statementExecutorType == StatementExecutorType.DIRECT_EXECUTOR);
+
mockSpanner.setExecuteStreamingSqlExecutionTime(
SimulatedExecutionTime.ofMinimumAndRandomTime(EXECUTION_TIME_SLOW_STATEMENT, 0));
@@ -737,6 +765,10 @@ public void testCancelReadOnlyTransactionalMultipleStatements() {
@Test
public void testCancelReadWriteAutocommit() {
+ assumeFalse(
+ "Direct executor does not yet support cancelling statements",
+ statementExecutorType == StatementExecutorType.DIRECT_EXECUTOR);
+
mockSpanner.setExecuteStreamingSqlExecutionTime(
SimulatedExecutionTime.ofMinimumAndRandomTime(EXECUTION_TIME_SLOW_STATEMENT, 0));
@@ -761,6 +793,10 @@ public void testCancelReadWriteAutocommit() {
@Test
public void testCancelReadWriteAutocommitMultipleStatements() {
+ assumeFalse(
+ "Direct executor does not yet support cancelling statements",
+ statementExecutorType == StatementExecutorType.DIRECT_EXECUTOR);
+
mockSpanner.setExecuteStreamingSqlExecutionTime(
SimulatedExecutionTime.ofMinimumAndRandomTime(EXECUTION_TIME_SLOW_STATEMENT, 0));
@@ -792,6 +828,10 @@ public void testCancelReadWriteAutocommitMultipleStatements() {
@Test
public void testCancelReadWriteAutocommitSlowUpdate() {
+ assumeFalse(
+ "Direct executor does not yet support cancelling statements",
+ statementExecutorType == StatementExecutorType.DIRECT_EXECUTOR);
+
mockSpanner.setExecuteSqlExecutionTime(
SimulatedExecutionTime.ofMinimumAndRandomTime(EXECUTION_TIME_SLOW_STATEMENT, 0));
@@ -815,6 +855,10 @@ public void testCancelReadWriteAutocommitSlowUpdate() {
@Test
public void testCancelReadWriteAutocommitSlowCommit() {
+ assumeFalse(
+ "Direct executor does not yet support cancelling statements",
+ statementExecutorType == StatementExecutorType.DIRECT_EXECUTOR);
+
mockSpanner.setCommitExecutionTime(
SimulatedExecutionTime.ofMinimumAndRandomTime(EXECUTION_TIME_SLOW_STATEMENT, 0));
@@ -838,6 +882,10 @@ public void testCancelReadWriteAutocommitSlowCommit() {
@Test
public void testCancelReadWriteTransactional() {
+ assumeFalse(
+ "Direct executor does not yet support cancelling statements",
+ statementExecutorType == StatementExecutorType.DIRECT_EXECUTOR);
+
mockSpanner.setExecuteStreamingSqlExecutionTime(
SimulatedExecutionTime.ofMinimumAndRandomTime(EXECUTION_TIME_SLOW_STATEMENT, 0));
@@ -862,6 +910,10 @@ public void testCancelReadWriteTransactional() {
@Test
public void testCancelReadWriteTransactionalMultipleStatements() {
+ assumeFalse(
+ "Direct executor does not yet support cancelling statements",
+ statementExecutorType == StatementExecutorType.DIRECT_EXECUTOR);
+
mockSpanner.setExecuteStreamingSqlExecutionTime(
SimulatedExecutionTime.ofMinimumAndRandomTime(EXECUTION_TIME_SLOW_STATEMENT, 0));
@@ -928,6 +980,10 @@ static void addMockDdlOperations(int count, boolean done) {
@Test
public void testCancelDdlBatch() {
+ assumeFalse(
+ "Direct executor does not yet support cancelling statements",
+ statementExecutorType == StatementExecutorType.DIRECT_EXECUTOR);
+
addSlowMockDdlOperation();
try (Connection connection = createConnection()) {
@@ -951,6 +1007,10 @@ public void testCancelDdlBatch() {
@Test
public void testCancelDdlAutocommit() {
+ assumeFalse(
+ "Direct executor does not yet support cancelling statements",
+ statementExecutorType == StatementExecutorType.DIRECT_EXECUTOR);
+
addSlowMockDdlOperation();
try (Connection connection = createConnection()) {
diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/it/ITAsyncTransactionRetryTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/it/ITAsyncTransactionRetryTest.java
index fa44ad6f5d9..744d7042df4 100644
--- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/it/ITAsyncTransactionRetryTest.java
+++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/connection/it/ITAsyncTransactionRetryTest.java
@@ -17,10 +17,8 @@
package com.google.cloud.spanner.connection.it;
import static com.google.cloud.spanner.SpannerApiFutures.get;
-import static com.google.cloud.spanner.testing.EmulatorSpannerHelper.isUsingEmulator;
import static com.google.common.truth.Truth.assertThat;
import static org.junit.Assert.fail;
-import static org.junit.Assume.assumeFalse;
import com.google.api.core.ApiFuture;
import com.google.api.core.SettableApiFuture;
@@ -580,7 +578,6 @@ public void testAbortWithResultSetFullyConsumed() {
@Test
public void testAbortWithConcurrentInsert() {
- assumeFalse("concurrent transactions are not supported on the emulator", isUsingEmulator());
AbortInterceptor interceptor = new AbortInterceptor(0);
try (ITConnection connection =
createConnection(interceptor, new CountTransactionRetryListener())) {
@@ -632,7 +629,6 @@ public void testAbortWithConcurrentInsert() {
@Test
public void testAbortWithConcurrentDelete() {
- assumeFalse("concurrent transactions are not supported on the emulator", isUsingEmulator());
AbortInterceptor interceptor = new AbortInterceptor(0);
// first insert two test records
try (ITConnection connection = createConnection()) {
@@ -686,7 +682,6 @@ public void testAbortWithConcurrentDelete() {
@Test
public void testAbortWithConcurrentUpdate() {
- assumeFalse("concurrent transactions are not supported on the emulator", isUsingEmulator());
AbortInterceptor interceptor = new AbortInterceptor(0);
// first insert two test records
try (ITConnection connection = createConnection()) {
@@ -746,7 +741,6 @@ public void testAbortWithConcurrentUpdate() {
*/
@Test
public void testAbortWithUnseenConcurrentInsert() throws InterruptedException {
- assumeFalse("concurrent transactions are not supported on the emulator", isUsingEmulator());
AbortInterceptor interceptor = new AbortInterceptor(0);
try (ITConnection connection =
createConnection(interceptor, new CountTransactionRetryListener())) {
diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITBatchReadTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITBatchReadTest.java
index 6598a3dca76..f028fbc2b15 100644
--- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITBatchReadTest.java
+++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITBatchReadTest.java
@@ -19,11 +19,9 @@
import static com.google.cloud.spanner.connection.ITAbstractSpannerTest.extractConnectionUrl;
import static com.google.cloud.spanner.connection.ITAbstractSpannerTest.getKeyFile;
import static com.google.cloud.spanner.connection.ITAbstractSpannerTest.hasValidKeyFile;
-import static com.google.cloud.spanner.testing.EmulatorSpannerHelper.isUsingEmulator;
import static com.google.common.truth.Truth.assertThat;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
-import static org.junit.Assume.assumeFalse;
import com.google.cloud.ByteArray;
import com.google.cloud.Timestamp;
@@ -96,10 +94,7 @@ public class ITBatchReadTest {
public static List data() {
List params = new ArrayList<>();
params.add(new DialectTestParameter(Dialect.GOOGLE_STANDARD_SQL));
- // PG dialect tests are not supported by the emulator
- if (!isUsingEmulator()) {
- params.add(new DialectTestParameter(Dialect.POSTGRESQL));
- }
+ params.add(new DialectTestParameter(Dialect.POSTGRESQL));
return params;
}
@@ -135,30 +130,28 @@ public static void setUpDatabase() throws Exception {
List databaseClients = new ArrayList<>();
databaseClients.add(env.getTestHelper().getDatabaseClient(googleStandardDatabase));
- if (!isUsingEmulator()) {
- postgreSQLDatabase =
- env.getTestHelper().createTestDatabase(Dialect.POSTGRESQL, Collections.emptyList());
- env.getTestHelper()
- .getClient()
- .getDatabaseAdminClient()
- .updateDatabaseDdl(
- env.getTestHelper().getInstanceId().getInstance(),
- postgreSQLDatabase.getId().getDatabase(),
- ImmutableList.of(
- "CREATE TABLE "
- + TABLE_NAME
- + " ("
- + " Key bigint not null primary key,"
- + " Data bytea,"
- + " Fingerprint bigint,"
- + " Size bigint"
- + ")",
- "CREATE INDEX " + INDEX_NAME + " ON " + TABLE_NAME + "(Fingerprint)"),
- null)
- .get();
- postgreSQLBatchClient = env.getTestHelper().getBatchClient(postgreSQLDatabase);
- databaseClients.add(env.getTestHelper().getDatabaseClient(postgreSQLDatabase));
- }
+ postgreSQLDatabase =
+ env.getTestHelper().createTestDatabase(Dialect.POSTGRESQL, Collections.emptyList());
+ env.getTestHelper()
+ .getClient()
+ .getDatabaseAdminClient()
+ .updateDatabaseDdl(
+ env.getTestHelper().getInstanceId().getInstance(),
+ postgreSQLDatabase.getId().getDatabase(),
+ ImmutableList.of(
+ "CREATE TABLE "
+ + TABLE_NAME
+ + " ("
+ + " Key bigint not null primary key,"
+ + " Data bytea,"
+ + " Fingerprint bigint,"
+ + " Size bigint"
+ + ")",
+ "CREATE INDEX " + INDEX_NAME + " ON " + TABLE_NAME + "(Fingerprint)"),
+ null)
+ .get();
+ postgreSQLBatchClient = env.getTestHelper().getBatchClient(postgreSQLDatabase);
+ databaseClients.add(env.getTestHelper().getDatabaseClient(postgreSQLDatabase));
List rows = manyRows();
numRows = rows.size();
@@ -210,9 +203,6 @@ private Database getDatabase() {
@Test
public void read() {
- assumeFalse(
- "PostgreSQL does not support the PartitionRead RPC", dialect.dialect == Dialect.POSTGRESQL);
-
BitSet seenRows = new BitSet(numRows);
TimestampBound bound = getRandomBound();
PartitionOptions partitionParams = getRandomPartitionOptions();
@@ -229,9 +219,6 @@ public void read() {
@Test
public void readUsingIndex() {
- assumeFalse(
- "PostgreSQL does not support the PartitionRead RPC", dialect.dialect == Dialect.POSTGRESQL);
-
TimestampBound bound = getRandomBound();
PartitionOptions partitionParams = getRandomPartitionOptions();
batchTxn = getBatchClient().batchReadOnlyTransaction(bound);
@@ -258,8 +245,6 @@ public void readUsingIndex() {
@Test
public void dataBoostRead() {
- assumeFalse("Emulator does not support data boost read", isUsingEmulator());
-
BitSet seenRows = new BitSet(numRows);
TimestampBound bound = getRandomBound();
PartitionOptions partitionParams = getRandomPartitionOptions();
@@ -312,7 +297,6 @@ private PartitionOptions getRandomPartitionOptions() {
@Test
public void dataBoostQuery() {
- assumeFalse("Emulator does not support data boost query", isUsingEmulator());
BitSet seenRows = new BitSet(numRows);
TimestampBound bound = getRandomBound();
PartitionOptions partitionParams = getRandomPartitionOptions();
diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITBuiltInMetricsTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITBuiltInMetricsTest.java
index 9ff7e06e813..258c1230709 100644
--- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITBuiltInMetricsTest.java
+++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITBuiltInMetricsTest.java
@@ -31,6 +31,8 @@
import com.google.monitoring.v3.TimeInterval;
import com.google.protobuf.util.Timestamps;
import java.io.IOException;
+import java.time.Duration;
+import java.time.Instant;
import java.util.concurrent.TimeUnit;
import org.junit.BeforeClass;
import org.junit.ClassRule;
@@ -39,8 +41,6 @@
import org.junit.experimental.categories.Category;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
-import org.threeten.bp.Duration;
-import org.threeten.bp.Instant;
@Category(ParallelIntegrationTest.class)
@RunWith(JUnit4.class)
diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITCommitTimestampTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITCommitTimestampTest.java
index 5a3b5c14707..70c9cb3757a 100644
--- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITCommitTimestampTest.java
+++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITCommitTimestampTest.java
@@ -36,6 +36,8 @@
import com.google.cloud.spanner.connection.ConnectionOptions;
import com.google.cloud.spanner.testing.RemoteSpannerHelper;
import com.google.common.collect.ImmutableList;
+import java.time.Duration;
+import java.time.Instant;
import java.util.Arrays;
import java.util.Collections;
import java.util.concurrent.ExecutionException;
@@ -47,8 +49,6 @@
import org.junit.experimental.categories.Category;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
-import org.threeten.bp.Duration;
-import org.threeten.bp.Instant;
/** Integration test for commit timestamp of Cloud Spanner. */
@Category(ParallelIntegrationTest.class)
diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITDMLTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITDMLTest.java
index 5ea30912103..ab3c8e24a8c 100644
--- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITDMLTest.java
+++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITDMLTest.java
@@ -16,14 +16,12 @@
package com.google.cloud.spanner.it;
-import static com.google.cloud.spanner.testing.EmulatorSpannerHelper.isUsingEmulator;
import static com.google.common.truth.Truth.assertThat;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
-import static org.junit.Assume.assumeFalse;
import com.google.cloud.spanner.AbortedException;
import com.google.cloud.spanner.Database;
@@ -90,15 +88,13 @@ public static void setUpDatabase() {
+ " V INT64,"
+ ") PRIMARY KEY (K)");
googleStandardSQLClient = env.getTestHelper().getDatabaseClient(googleStandardSQLDatabase);
- if (!isUsingEmulator()) {
- Database postgreSQLDatabase =
- env.getTestHelper()
- .createTestDatabase(
- Dialect.POSTGRESQL,
- Arrays.asList(
- "CREATE TABLE T (" + " K VARCHAR PRIMARY KEY," + " V BIGINT" + ")"));
- postgreSQLClient = env.getTestHelper().getDatabaseClient(postgreSQLDatabase);
- }
+ Database postgreSQLDatabase =
+ env.getTestHelper()
+ .createTestDatabase(
+ Dialect.POSTGRESQL,
+ Arrays.asList(
+ "CREATE TABLE T (" + " K VARCHAR PRIMARY KEY," + " V BIGINT" + ")"));
+ postgreSQLClient = env.getTestHelper().getDatabaseClient(postgreSQLDatabase);
}
@AfterClass
@@ -122,10 +118,7 @@ public void increaseTestIdAndDeleteTestData() {
public static List data() {
List params = new ArrayList<>();
params.add(new DialectTestParameter(Dialect.GOOGLE_STANDARD_SQL));
- // "PG dialect tests are not supported by the emulator"
- if (!isUsingEmulator()) {
- params.add(new DialectTestParameter(Dialect.POSTGRESQL));
- }
+ params.add(new DialectTestParameter(Dialect.POSTGRESQL));
return params;
}
@@ -389,10 +382,6 @@ public void standardDMLWithExecuteSQL() {
@Test
public void testUntypedNullValues() {
- assumeFalse(
- "Spanner PostgreSQL does not yet support untyped null values",
- dialect.dialect == Dialect.POSTGRESQL);
-
DatabaseClient client = getClient(dialect.dialect);
String sql;
if (dialect.dialect == Dialect.POSTGRESQL) {
diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITDatabaseTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITDatabaseTest.java
index f9230b8836b..b9813d512fd 100644
--- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITDatabaseTest.java
+++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITDatabaseTest.java
@@ -20,7 +20,6 @@
import static com.google.common.truth.Truth.assertThat;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.fail;
-import static org.junit.Assume.assumeFalse;
import com.google.api.client.util.ExponentialBackOff;
import com.google.api.gax.longrunning.OperationFuture;
@@ -182,8 +181,6 @@ public void instanceNotFound() {
@Test
public void testNumericPrimaryKey() {
- assumeFalse("Emulator does not support numeric primary keys", isUsingEmulator());
-
final String table = "NumericTable";
// Creates table with numeric primary key
diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITDmlReturningTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITDmlReturningTest.java
index 8cb465e4c84..f54365ba84d 100644
--- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITDmlReturningTest.java
+++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITDmlReturningTest.java
@@ -42,7 +42,6 @@
import com.google.cloud.spanner.TransactionRunner;
import com.google.cloud.spanner.TransactionRunner.TransactionCallable;
import com.google.cloud.spanner.connection.ConnectionOptions;
-import com.google.cloud.spanner.testing.EmulatorSpannerHelper;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
@@ -75,8 +74,6 @@ public final class ITDmlReturningTest {
@BeforeClass
public static void setUpDatabase() {
- assumeFalse(
- "DML Returning is not supported in the emulator", EmulatorSpannerHelper.isUsingEmulator());
Database googleStandardSQLDatabase =
env.getTestHelper()
.createTestDatabase(
@@ -85,18 +82,16 @@ public static void setUpDatabase() {
+ " V INT64,"
+ ") PRIMARY KEY (K)");
googleStandardSQLClient = env.getTestHelper().getDatabaseClient(googleStandardSQLDatabase);
- if (!isUsingEmulator()) {
- Database postgreSQLDatabase =
- env.getTestHelper()
- .createTestDatabase(
- Dialect.POSTGRESQL,
- Collections.singletonList(
- "CREATE TABLE T ("
- + " \"K\" VARCHAR PRIMARY KEY,"
- + " \"V\" BIGINT"
- + ")"));
- postgreSQLClient = env.getTestHelper().getDatabaseClient(postgreSQLDatabase);
- }
+ Database postgreSQLDatabase =
+ env.getTestHelper()
+ .createTestDatabase(
+ Dialect.POSTGRESQL,
+ Collections.singletonList(
+ "CREATE TABLE T ("
+ + " \"K\" VARCHAR PRIMARY KEY,"
+ + " \"V\" BIGINT"
+ + ")"));
+ postgreSQLClient = env.getTestHelper().getDatabaseClient(postgreSQLDatabase);
}
@AfterClass
@@ -222,6 +217,9 @@ private void executeUpdateAsync(long expectedCount, final String... stmts) {
@Test
public void dmlReturningWithExecutePartitionedUpdate() {
+ assumeFalse(
+ "The emulator does not dis-allow THEN RETURN statements for PDML", isUsingEmulator());
+
SpannerException e =
assertThrows(
SpannerException.class,
diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITFloat32Test.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITFloat32Test.java
index 393c2db8755..1536912f686 100644
--- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITFloat32Test.java
+++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITFloat32Test.java
@@ -16,13 +16,11 @@
package com.google.cloud.spanner.it;
-import static com.google.cloud.spanner.testing.EmulatorSpannerHelper.isUsingEmulator;
import static org.junit.Assert.assertArrayEquals;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertThrows;
import static org.junit.Assert.assertTrue;
-import static org.junit.Assume.assumeFalse;
import com.google.cloud.Timestamp;
import com.google.cloud.spanner.Database;
@@ -93,8 +91,6 @@ public static List data() {
@BeforeClass
public static void setUpDatabase()
throws ExecutionException, InterruptedException, TimeoutException {
- assumeFalse("Emulator does not support FLOAT32 yet", isUsingEmulator());
-
Database googleStandardSQLDatabase =
env.getTestHelper().createTestDatabase(GOOGLE_STANDARD_SQL_SCHEMA);
diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITForeignKeyDeleteCascadeTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITForeignKeyDeleteCascadeTest.java
index fc7c860267a..448aab85114 100644
--- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITForeignKeyDeleteCascadeTest.java
+++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITForeignKeyDeleteCascadeTest.java
@@ -15,11 +15,11 @@
*/
package com.google.cloud.spanner.it;
+import static com.google.cloud.spanner.testing.EmulatorSpannerHelper.isUsingEmulator;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertThrows;
import static org.junit.Assert.assertTrue;
-import static org.junit.Assume.assumeFalse;
import com.google.cloud.spanner.Database;
import com.google.cloud.spanner.DatabaseAdminClient;
@@ -33,7 +33,6 @@
import com.google.cloud.spanner.ResultSet;
import com.google.cloud.spanner.SpannerException;
import com.google.cloud.spanner.Statement;
-import com.google.cloud.spanner.testing.EmulatorSpannerHelper;
import com.google.common.collect.ImmutableList;
import java.util.ArrayList;
import java.util.Arrays;
@@ -68,46 +67,44 @@ public static List data() {
private static Database GOOGLE_STANDARD_SQL_DATABASE;
private static Database POSTGRESQL_DATABASE;
- private static List dbs = new ArrayList<>();
+ private static final List dbs = new ArrayList<>();
@Parameterized.Parameter(0)
public DialectTestParameter dialect;
@BeforeClass
public static void setUpDatabase() {
- if (!EmulatorSpannerHelper.isUsingEmulator()) {
- GOOGLE_STANDARD_SQL_DATABASE =
- env.getTestHelper()
- .createTestDatabase(
- ImmutableList.of(
- "CREATE TABLE Singer (\n"
- + " singer_id INT64 NOT NULL,\n"
- + " first_name STRING(1024),\n"
- + ") PRIMARY KEY(singer_id)\n",
- "CREATE TABLE Concert (\n"
- + " venue_id INT64 NOT NULL,\n"
- + " singer_id INT64 NOT NULL,\n"
- + " CONSTRAINT Fk_Concert_Singer FOREIGN KEY (singer_id) REFERENCES Singer (singer_id) ON DELETE CASCADE"
- + ") PRIMARY KEY(venue_id, singer_id)"));
- POSTGRESQL_DATABASE =
- env.getTestHelper()
- .createTestDatabase(
- Dialect.POSTGRESQL,
- ImmutableList.of(
- "CREATE TABLE Singer (\n"
- + " singer_id BIGINT PRIMARY KEY,\n"
- + " first_name VARCHAR\n"
- + ")",
- "CREATE TABLE Concert (\n"
- + " venue_id BIGINT NOT NULL,\n"
- + " singer_id BIGINT NOT NULL,\n"
- + " PRIMARY KEY (venue_id, singer_id),\n"
- + " CONSTRAINT Fk_Concert_Singer FOREIGN KEY (singer_id) REFERENCES Singer (singer_id) ON DELETE CASCADE\n"
- + " )"));
-
- dbs.add(GOOGLE_STANDARD_SQL_DATABASE);
- dbs.add(POSTGRESQL_DATABASE);
- }
+ GOOGLE_STANDARD_SQL_DATABASE =
+ env.getTestHelper()
+ .createTestDatabase(
+ ImmutableList.of(
+ "CREATE TABLE Singer (\n"
+ + " singer_id INT64 NOT NULL,\n"
+ + " first_name STRING(1024),\n"
+ + ") PRIMARY KEY(singer_id)\n",
+ "CREATE TABLE Concert (\n"
+ + " venue_id INT64 NOT NULL,\n"
+ + " singer_id INT64 NOT NULL,\n"
+ + " CONSTRAINT Fk_Concert_Singer FOREIGN KEY (singer_id) REFERENCES Singer (singer_id) ON DELETE CASCADE\n"
+ + ") PRIMARY KEY(venue_id, singer_id)"));
+ POSTGRESQL_DATABASE =
+ env.getTestHelper()
+ .createTestDatabase(
+ Dialect.POSTGRESQL,
+ ImmutableList.of(
+ "CREATE TABLE Singer (\n"
+ + " singer_id BIGINT PRIMARY KEY,\n"
+ + " first_name VARCHAR\n"
+ + ")",
+ "CREATE TABLE Concert (\n"
+ + " venue_id BIGINT NOT NULL,\n"
+ + " singer_id BIGINT NOT NULL,\n"
+ + " PRIMARY KEY (venue_id, singer_id),\n"
+ + " CONSTRAINT \"Fk_Concert_Singer\" FOREIGN KEY (singer_id) REFERENCES Singer (singer_id) ON DELETE CASCADE\n"
+ + " )"));
+
+ dbs.add(GOOGLE_STANDARD_SQL_DATABASE);
+ dbs.add(POSTGRESQL_DATABASE);
}
@AfterClass
@@ -120,10 +117,6 @@ public static void tearDown() {
@Test
public void testForeignKeyDeleteCascadeConstraints_withCreateDDLStatements() {
- assumeFalse(
- "Emulator does not yet support foreign key delete cascade",
- EmulatorSpannerHelper.isUsingEmulator());
-
final DatabaseClient databaseClient = getCreatedDatabaseClient();
try (final ResultSet rs =
databaseClient
@@ -133,17 +126,17 @@ public void testForeignKeyDeleteCascadeConstraints_withCreateDDLStatements() {
"SELECT DELETE_RULE\n"
+ "FROM INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS\n"
+ "WHERE CONSTRAINT_NAME ='Fk_Concert_Singer'"))) {
- while (rs.next()) {
- assertEquals(rs.getString(DELETE_RULE_COLUMN_NAME), "CASCADE");
+ assertTrue(rs.next());
+ // TODO: Enable for the emulator when it returns the correct value for DELETE_RULE.
+ if (!isUsingEmulator()) {
+ assertEquals("CASCADE", rs.getString(0));
}
+ assertFalse(rs.next());
}
}
@Test
public void testForeignKeyDeleteCascadeConstraints_withAlterDDLStatements() throws Exception {
- assumeFalse(
- "Emulator does not yet support foreign key delete cascade",
- EmulatorSpannerHelper.isUsingEmulator());
// Creating new tables within this test to ensure we don't pollute tables used by other tests in
// this class.
List createStatements;
@@ -160,7 +153,7 @@ public void testForeignKeyDeleteCascadeConstraints_withAlterDDLStatements() thro
+ " PRIMARY KEY (venue_id, singer_id)\n"
+ " )",
"ALTER TABLE ConcertV2 "
- + "ADD CONSTRAINT Fk_Concert_Singer_V2 FOREIGN KEY(singer_id) REFERENCES Singer(singer_id) "
+ + "ADD CONSTRAINT \"Fk_Concert_Singer_V2\" FOREIGN KEY(singer_id) REFERENCES Singer(singer_id) "
+ "ON DELETE CASCADE");
} else {
createStatements =
@@ -181,7 +174,7 @@ public void testForeignKeyDeleteCascadeConstraints_withAlterDDLStatements() thro
env.getTestHelper().createTestDatabase(dialect.dialect, createStatements);
dbs.add(createdDatabase);
- final DatabaseClient databaseClient = getCreatedDatabaseClient();
+ final DatabaseClient databaseClient = env.getTestHelper().getDatabaseClient(createdDatabase);
try (final ResultSet rs =
databaseClient
@@ -190,10 +183,13 @@ public void testForeignKeyDeleteCascadeConstraints_withAlterDDLStatements() thro
Statement.of(
"SELECT DELETE_RULE\n"
+ "FROM INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS\n"
- + "WHERE CONSTRAINT_NAME ='Fk_Concert_Singer'"))) {
- while (rs.next()) {
- assertEquals(rs.getString(DELETE_RULE_COLUMN_NAME), "CASCADE");
+ + "WHERE CONSTRAINT_NAME ='Fk_Concert_Singer_V2'"))) {
+ assertTrue(rs.next());
+ // TODO: Enable when the emulator returns the correct value for this column.
+ if (!isUsingEmulator()) {
+ assertEquals("CASCADE", rs.getString(0));
}
+ assertFalse(rs.next());
}
// remove the foreign key delete cascade constraint
@@ -215,19 +211,15 @@ public void testForeignKeyDeleteCascadeConstraints_withAlterDDLStatements() thro
Statement.of(
"SELECT DELETE_RULE\n"
+ "FROM INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS\n"
- + "WHERE CONSTRAINT_NAME ='Fk_Concert_Singer_V2'"))) {
- while (rs.next()) {
- assertEquals(rs.getString(DELETE_RULE_COLUMN_NAME), "NO ACTION");
- }
+ + "WHERE LOWER(CONSTRAINT_NAME) ='fk_concert_singer_v2'"))) {
+ assertTrue(rs.next());
+ assertEquals("NO ACTION", rs.getString(0));
+ assertFalse(rs.next());
}
}
@Test
public void testForeignKeyDeleteCascadeConstraints_verifyValidInsertions() {
- assumeFalse(
- "Emulator does not yet support foreign key delete cascade",
- EmulatorSpannerHelper.isUsingEmulator());
-
final DatabaseClient databaseClient = getCreatedDatabaseClient();
final String singerInsertStatement =
"INSERT INTO Singer (singer_id, first_name) VALUES (" + generateQueryParameters(2) + ")";
@@ -289,10 +281,6 @@ public void testForeignKeyDeleteCascadeConstraints_verifyValidInsertions() {
@Test
public void testForeignKeyDeleteCascadeConstraints_verifyInvalidInsertions() {
- assumeFalse(
- "Emulator does not yet support foreign key delete cascade",
- EmulatorSpannerHelper.isUsingEmulator());
-
final DatabaseClient databaseClient = getCreatedDatabaseClient();
// unsuccessful inserts into referencing tables when foreign key is not inserted into referenced
@@ -319,16 +307,12 @@ public void testForeignKeyDeleteCascadeConstraints_verifyInvalidInsertions() {
transaction.executeUpdate(concertInsertStatementWithInvalidValues);
return null;
}));
- assertEquals(ex.getErrorCode(), ErrorCode.FAILED_PRECONDITION);
- assertTrue(ex.getMessage().contains("Cannot find referenced values"));
+ assertEquals(ErrorCode.FAILED_PRECONDITION, ex.getErrorCode());
+ assertTrue(ex.getMessage(), ex.getMessage().contains("Cannot find referenced"));
}
@Test
public void testForeignKeyDeleteCascadeConstraints_forDeletions() {
- assumeFalse(
- "Emulator does not yet support foreign key delete cascade",
- EmulatorSpannerHelper.isUsingEmulator());
-
final DatabaseClient databaseClient = getCreatedDatabaseClient();
final String singerInsertStatement =
@@ -396,10 +380,6 @@ public void testForeignKeyDeleteCascadeConstraints_forDeletions() {
@Test
public void testForeignKeyDeleteCascadeConstraints_forMutations_onConflictDueToParentTable() {
- assumeFalse(
- "Emulator does not yet support foreign key delete cascade",
- EmulatorSpannerHelper.isUsingEmulator());
-
final DatabaseClient databaseClient = getCreatedDatabaseClient();
// inserting and deleting the referenced key within the same mutation are considered
@@ -423,15 +403,11 @@ public void testForeignKeyDeleteCascadeConstraints_forMutations_onConflictDueToP
Mutation.delete("Singer", Key.of(4L))));
return null;
}));
- assertEquals(ex.getErrorCode(), ErrorCode.FAILED_PRECONDITION);
+ assertEquals(ErrorCode.FAILED_PRECONDITION, ex.getErrorCode());
}
@Test
public void testForeignKeyDeleteCascadeConstraints_forMutations_onConflictsDueToChildTable() {
- assumeFalse(
- "Emulator does not yet support foreign key delete cascade",
- EmulatorSpannerHelper.isUsingEmulator());
-
final DatabaseClient databaseClient = getCreatedDatabaseClient();
// referencing a foreign key in child table and deleting the referenced key in parent table
@@ -454,25 +430,24 @@ public void testForeignKeyDeleteCascadeConstraints_forMutations_onConflictsDueTo
transaction.executeUpdate(singerInsertStatementWithValues);
return null;
});
- SpannerException ex =
- assertThrows(
- SpannerException.class,
- () ->
- databaseClient
- .readWriteTransaction()
- .run(
- transaction -> {
- transaction.buffer(
- Arrays.asList(
- Mutation.newInsertBuilder("Concert")
- .set("first_name")
- .to(5L)
- .set("singer_id")
- .to(5L)
- .build(),
- Mutation.delete("Singer", Key.of(5L))));
- return null;
- }));
+ assertThrows(
+ SpannerException.class,
+ () ->
+ databaseClient
+ .readWriteTransaction()
+ .run(
+ transaction -> {
+ transaction.buffer(
+ Arrays.asList(
+ Mutation.newInsertBuilder("Concert")
+ .set("first_name")
+ .to(5L)
+ .set("singer_id")
+ .to(5L)
+ .build(),
+ Mutation.delete("Singer", Key.of(5L))));
+ return null;
+ }));
}
private DatabaseAdminClient getDatabaseAdminClient() {
@@ -481,16 +456,13 @@ private DatabaseAdminClient getDatabaseAdminClient() {
private DatabaseClient getCreatedDatabaseClient() {
if (dialect.dialect == Dialect.POSTGRESQL) {
- return env.getTestHelper().getDatabaseClient(this.POSTGRESQL_DATABASE);
+ return env.getTestHelper().getDatabaseClient(POSTGRESQL_DATABASE);
}
- return env.getTestHelper().getDatabaseClient(this.GOOGLE_STANDARD_SQL_DATABASE);
+ return env.getTestHelper().getDatabaseClient(GOOGLE_STANDARD_SQL_DATABASE);
}
/**
* Returns '@p1, @p2, ..., @pNumParams' for GoogleSQL and $1, $2, ..., $NumParams' for PostgreSQL
- *
- * @param numParams
- * @return
*/
private String generateQueryParameters(final int numParams) {
final List params;
diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITJsonWriteReadTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITJsonWriteReadTest.java
index c6f72349f0b..e355eaa07a3 100644
--- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITJsonWriteReadTest.java
+++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITJsonWriteReadTest.java
@@ -18,7 +18,6 @@
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertThrows;
-import static org.junit.Assume.assumeFalse;
import com.google.cloud.spanner.Database;
import com.google.cloud.spanner.DatabaseClient;
@@ -30,7 +29,6 @@
import com.google.cloud.spanner.SpannerException;
import com.google.cloud.spanner.Statement;
import com.google.cloud.spanner.Value;
-import com.google.cloud.spanner.testing.EmulatorSpannerHelper;
import com.google.cloud.spanner.testing.RemoteSpannerHelper;
import com.google.common.io.Resources;
import java.io.File;
@@ -68,23 +66,19 @@ public class ITJsonWriteReadTest {
@BeforeClass
public static void beforeClass() {
final RemoteSpannerHelper testHelper = env.getTestHelper();
- if (!EmulatorSpannerHelper.isUsingEmulator()) {
- final Database database =
- testHelper.createTestDatabase(
- "CREATE TABLE "
- + TABLE_NAME
- + "("
- + "Id INT64 NOT NULL,"
- + "json JSON"
- + ") PRIMARY KEY (Id)");
- databaseClient = testHelper.getDatabaseClient(database);
- }
+ final Database database =
+ testHelper.createTestDatabase(
+ "CREATE TABLE "
+ + TABLE_NAME
+ + "("
+ + "Id INT64 NOT NULL,"
+ + "json JSON"
+ + ") PRIMARY KEY (Id)");
+ databaseClient = testHelper.getDatabaseClient(database);
}
@Test
public void testWriteValidJsonValues() throws IOException {
- assumeFalse("Emulator does not yet support JSON", EmulatorSpannerHelper.isUsingEmulator());
-
List resources = getJsonFilePaths(RESOURCES_DIR + File.separator + VALID_JSON_DIR);
long id = 0L;
@@ -116,8 +110,6 @@ public void testWriteValidJsonValues() throws IOException {
@Test
public void testWriteAndReadInvalidJsonValues() throws IOException {
- assumeFalse("Emulator does not yet support JSON", EmulatorSpannerHelper.isUsingEmulator());
-
List resources = getJsonFilePaths(RESOURCES_DIR + File.separator + INVALID_JSON_DIR);
AtomicLong id = new AtomicLong(100);
diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITLargeReadTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITLargeReadTest.java
index b60505c873a..83d505e2124 100644
--- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITLargeReadTest.java
+++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITLargeReadTest.java
@@ -16,7 +16,6 @@
package com.google.cloud.spanner.it;
-import static com.google.cloud.spanner.testing.EmulatorSpannerHelper.isUsingEmulator;
import static com.google.common.truth.Truth.assertThat;
import com.google.cloud.ByteArray;
@@ -31,6 +30,7 @@
import com.google.cloud.spanner.ResultSet;
import com.google.cloud.spanner.Statement;
import com.google.cloud.spanner.connection.ConnectionOptions;
+import com.google.common.collect.ImmutableList;
import com.google.common.hash.HashFunction;
import com.google.common.hash.Hashing;
import java.util.ArrayList;
@@ -88,20 +88,18 @@ public static void setUpDatabase() {
+ " Size INT64,"
+ ") PRIMARY KEY (Key)");
googleStandardSQLClient = env.getTestHelper().getDatabaseClient(googleStandardSQLDatabase);
- if (!isUsingEmulator()) {
- Database postgreSQLDatabase =
- env.getTestHelper()
- .createTestDatabase(
- Dialect.POSTGRESQL,
- Arrays.asList(
- "CREATE TABLE TestTable ("
- + " Key BIGINT PRIMARY KEY,"
- + " Data BYTEA,"
- + " Fingerprint BIGINT,"
- + " Size BIGINT"
- + ")"));
- postgreSQLClient = env.getTestHelper().getDatabaseClient(postgreSQLDatabase);
- }
+ Database postgreSQLDatabase =
+ env.getTestHelper()
+ .createTestDatabase(
+ Dialect.POSTGRESQL,
+ ImmutableList.of(
+ "CREATE TABLE TestTable ("
+ + " Key BIGINT PRIMARY KEY,"
+ + " Data BYTEA,"
+ + " Fingerprint BIGINT,"
+ + " Size BIGINT"
+ + ")"));
+ postgreSQLClient = env.getTestHelper().getDatabaseClient(postgreSQLDatabase);
hasher = Hashing.goodFastHash(64);
List mutations = new ArrayList<>();
@@ -127,17 +125,13 @@ public static void setUpDatabase() {
i++;
if (totalSize >= WRITE_BATCH_SIZE) {
googleStandardSQLClient.write(mutations);
- if (!isUsingEmulator()) {
- postgreSQLClient.write(mutations);
- }
+ postgreSQLClient.write(mutations);
mutations.clear();
totalSize = 0;
}
}
googleStandardSQLClient.write(mutations);
- if (!isUsingEmulator()) {
- postgreSQLClient.write(mutations);
- }
+ postgreSQLClient.write(mutations);
}
@AfterClass
@@ -149,10 +143,7 @@ public static void teardown() {
public static List data() {
List params = new ArrayList<>();
params.add(new DialectTestParameter(Dialect.GOOGLE_STANDARD_SQL));
- // "PG dialect tests are not supported by the emulator"
- if (!isUsingEmulator()) {
- params.add(new DialectTestParameter(Dialect.POSTGRESQL));
- }
+ params.add(new DialectTestParameter(Dialect.POSTGRESQL));
return params;
}
diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITPgJsonbTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITPgJsonbTest.java
index 7338c76f07e..275fbe6545f 100644
--- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITPgJsonbTest.java
+++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITPgJsonbTest.java
@@ -16,11 +16,11 @@
package com.google.cloud.spanner.it;
+import static com.google.cloud.spanner.testing.EmulatorSpannerHelper.isUsingEmulator;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertThrows;
import static org.junit.Assert.assertTrue;
-import static org.junit.Assume.assumeFalse;
import com.google.cloud.spanner.Database;
import com.google.cloud.spanner.DatabaseAdminClient;
@@ -36,11 +36,11 @@
import com.google.cloud.spanner.SpannerExceptionFactory;
import com.google.cloud.spanner.Statement;
import com.google.cloud.spanner.Value;
-import com.google.cloud.spanner.testing.EmulatorSpannerHelper;
import com.google.cloud.spanner.testing.RemoteSpannerHelper;
import com.google.common.collect.ImmutableList;
import com.google.protobuf.ListValue;
import com.google.protobuf.NullValue;
+import java.time.Duration;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
@@ -52,12 +52,10 @@
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.ClassRule;
-import org.junit.Ignore;
import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
-import org.threeten.bp.Duration;
@Category(ParallelIntegrationTest.class)
@RunWith(JUnit4.class)
@@ -77,8 +75,6 @@ public class ITPgJsonbTest {
@BeforeClass
public static void beforeClass() throws Exception {
- assumeFalse(
- "PgJsonb is not supported in the emulator", EmulatorSpannerHelper.isUsingEmulator());
testHelper = env.getTestHelper();
databaseAdminClient = testHelper.getClient().getDatabaseAdminClient();
databasesToDrop = new ArrayList<>();
@@ -97,7 +93,7 @@ public static void beforeClass() throws Exception {
}
@AfterClass
- public static void afterClass() throws Exception {
+ public static void afterClass() {
if (databasesToDrop != null) {
for (DatabaseId id : databasesToDrop) {
try {
@@ -170,11 +166,19 @@ public void testPgJsonbInSecondaryIndex() {
SpannerException spannerException =
SpannerExceptionFactory.asSpannerException(executionException.getCause());
assertEquals(ErrorCode.FAILED_PRECONDITION, spannerException.getErrorCode());
- assertTrue(
- spannerException.getMessage(),
- spannerException
- .getMessage()
- .contains("Index idx_jsonb is defined on a column of unsupported type PG.JSONB."));
+ if (isUsingEmulator()) {
+ assertTrue(
+ spannerException.getMessage(),
+ spannerException
+ .getMessage()
+ .contains("Cannot reference PG.JSONB col1 in the creation of index idx_jsonb."));
+ } else {
+ assertTrue(
+ spannerException.getMessage(),
+ spannerException
+ .getMessage()
+ .contains("Index idx_jsonb is defined on a column of unsupported type PG.JSONB."));
+ }
}
private static final String JSON_VALUE_1 = "{\"color\":\"red\",\"value\":\"#f00\"}";
@@ -189,8 +193,6 @@ public void testPgJsonbInSecondaryIndex() {
@Test
public void testLiteralPgJsonb() {
- assumeFalse(
- "PgJsonb is not supported in the emulator", EmulatorSpannerHelper.isUsingEmulator());
databaseClient
.readWriteTransaction()
.run(
@@ -223,8 +225,6 @@ public void testLiteralPgJsonb() {
@Test
public void testPgJsonbParameter() {
- assumeFalse(
- "PgJsonb is not supported in the emulator", EmulatorSpannerHelper.isUsingEmulator());
databaseClient
.readWriteTransaction()
.run(
@@ -275,12 +275,8 @@ private ListValue getJsonListValue(List jsonList) {
.build();
}
- @Ignore("Untyped jsonb parameters are not yet supported")
@Test
public void testPgJsonbUntypedParameter() {
- assumeFalse(
- "PgJsonb is not supported in the emulator", EmulatorSpannerHelper.isUsingEmulator());
-
// Verify that we can use Jsonb as an untyped parameter. This is especially important for
// PGAdapter and the JDBC driver, as these will often use untyped parameters.
databaseClient
@@ -362,8 +358,6 @@ public void testPgJsonbUntypedParameter() {
@Test
public void testMutationsWithPgJsonbAsString() {
- assumeFalse(
- "PgJsonb is not supported in the emulator", EmulatorSpannerHelper.isUsingEmulator());
databaseClient
.readWriteTransaction()
.run(
@@ -418,8 +412,6 @@ public void testMutationsWithPgJsonbAsString() {
@Test
public void testMutationsWithPgJsonbAsValue() {
- assumeFalse(
- "PgJsonb is not supported in the emulator", EmulatorSpannerHelper.isUsingEmulator());
databaseClient
.readWriteTransaction()
.run(
diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITPgNumericTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITPgNumericTest.java
index b5fc084a54c..76025b07175 100644
--- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITPgNumericTest.java
+++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITPgNumericTest.java
@@ -18,7 +18,6 @@
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
-import static org.junit.Assume.assumeFalse;
import com.google.cloud.spanner.Database;
import com.google.cloud.spanner.DatabaseAdminClient;
@@ -31,10 +30,10 @@
import com.google.cloud.spanner.ResultSet;
import com.google.cloud.spanner.Statement;
import com.google.cloud.spanner.Value;
-import com.google.cloud.spanner.testing.EmulatorSpannerHelper;
import com.google.cloud.spanner.testing.RemoteSpannerHelper;
import com.google.common.collect.ImmutableList;
import java.math.BigDecimal;
+import java.time.Duration;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
@@ -47,7 +46,6 @@
import org.junit.experimental.categories.Category;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
-import org.threeten.bp.Duration;
@Category(ParallelIntegrationTest.class)
@RunWith(JUnit4.class)
@@ -67,8 +65,6 @@ public class ITPgNumericTest {
@BeforeClass
public static void beforeClass() throws Exception {
- assumeFalse(
- "PgNumeric is not supported in the emulator", EmulatorSpannerHelper.isUsingEmulator());
testHelper = env.getTestHelper();
databaseAdminClient = testHelper.getClient().getDatabaseAdminClient();
databasesToDrop = new ArrayList<>();
@@ -116,8 +112,6 @@ public void setUp() throws Exception {
@Test
public void testLiteralPgNumeric() {
- assumeFalse(
- "PgNumeric is not supported in the emulator", EmulatorSpannerHelper.isUsingEmulator());
databaseClient
.readWriteTransaction()
.run(
@@ -134,7 +128,9 @@ public void testLiteralPgNumeric() {
});
try (ResultSet resultSet =
- databaseClient.singleUse().executeQuery(Statement.of("SELECT * FROM " + tableName))) {
+ databaseClient
+ .singleUse()
+ .executeQuery(Statement.of("SELECT * FROM " + tableName + " ORDER BY id"))) {
resultSet.next();
assertEquals("1.23", resultSet.getString("col1"));
@@ -151,8 +147,6 @@ public void testLiteralPgNumeric() {
@Test
public void testParameterizedWithPgNumericAsValue() {
- assumeFalse(
- "PgNumeric is not supported in the emulator", EmulatorSpannerHelper.isUsingEmulator());
databaseClient
.readWriteTransaction()
.run(
@@ -176,7 +170,9 @@ public void testParameterizedWithPgNumericAsValue() {
});
try (ResultSet resultSet =
- databaseClient.singleUse().executeQuery(Statement.of("SELECT * FROM " + tableName))) {
+ databaseClient
+ .singleUse()
+ .executeQuery(Statement.of("SELECT * FROM " + tableName + " ORDER BY id"))) {
resultSet.next();
assertEquals("1.23", resultSet.getString("col1"));
@@ -193,8 +189,6 @@ public void testParameterizedWithPgNumericAsValue() {
@Test
public void testParameterizedWithPgNumericAsDouble() {
- assumeFalse(
- "PgNumeric is not supported in the emulator", EmulatorSpannerHelper.isUsingEmulator());
databaseClient
.readWriteTransaction()
.run(
@@ -218,7 +212,9 @@ public void testParameterizedWithPgNumericAsDouble() {
});
try (ResultSet resultSet =
- databaseClient.singleUse().executeQuery(Statement.of("SELECT * FROM " + tableName))) {
+ databaseClient
+ .singleUse()
+ .executeQuery(Statement.of("SELECT * FROM " + tableName + " ORDER BY id"))) {
resultSet.next();
assertEquals("1.23", resultSet.getString("col1"));
@@ -235,8 +231,6 @@ public void testParameterizedWithPgNumericAsDouble() {
@Test
public void testParameterizedWithPgNumericAsInt() {
- assumeFalse(
- "PgNumeric is not supported in the emulator", EmulatorSpannerHelper.isUsingEmulator());
databaseClient
.readWriteTransaction()
.run(
@@ -260,8 +254,6 @@ public void testParameterizedWithPgNumericAsInt() {
@Test
public void testParameterizedWithPgNumericAsLong() {
- assumeFalse(
- "PgNumeric is not supported in the emulator", EmulatorSpannerHelper.isUsingEmulator());
databaseClient
.readWriteTransaction()
.run(
@@ -285,8 +277,6 @@ public void testParameterizedWithPgNumericAsLong() {
@Test
public void testMutationsWithPgNumericAsString() {
- assumeFalse(
- "PgNumeric is not supported in the emulator", EmulatorSpannerHelper.isUsingEmulator());
databaseClient
.readWriteTransaction()
.run(
@@ -315,7 +305,9 @@ public void testMutationsWithPgNumericAsString() {
});
try (ResultSet resultSet =
- databaseClient.singleUse().executeQuery(Statement.of("SELECT * FROM " + tableName))) {
+ databaseClient
+ .singleUse()
+ .executeQuery(Statement.of("SELECT * FROM " + tableName + " ORDER BY id"))) {
resultSet.next();
assertEquals("1.23", resultSet.getString("col1"));
@@ -332,8 +324,6 @@ public void testMutationsWithPgNumericAsString() {
@Test
public void testMutationsWithPgNumericAsInt() {
- assumeFalse(
- "PgNumeric is not supported in the emulator", EmulatorSpannerHelper.isUsingEmulator());
databaseClient
.readWriteTransaction()
.run(
@@ -360,8 +350,6 @@ public void testMutationsWithPgNumericAsInt() {
@Test
public void testMutationsWithPgNumericAsLong() {
- assumeFalse(
- "PgNumeric is not supported in the emulator", EmulatorSpannerHelper.isUsingEmulator());
databaseClient
.readWriteTransaction()
.run(
@@ -388,8 +376,6 @@ public void testMutationsWithPgNumericAsLong() {
@Test
public void testMutationsWithPgNumericAsBigDecimal() {
- assumeFalse(
- "PgNumeric is not supported in the emulator", EmulatorSpannerHelper.isUsingEmulator());
databaseClient
.readWriteTransaction()
.run(
@@ -412,7 +398,9 @@ public void testMutationsWithPgNumericAsBigDecimal() {
});
try (ResultSet resultSet =
- databaseClient.singleUse().executeQuery(Statement.of("SELECT * FROM " + tableName))) {
+ databaseClient
+ .singleUse()
+ .executeQuery(Statement.of("SELECT * FROM " + tableName + " ORDER BY id"))) {
resultSet.next();
assertEquals("1.23", resultSet.getString("col1"));
@@ -425,8 +413,6 @@ public void testMutationsWithPgNumericAsBigDecimal() {
@Test
public void testMutationsWithPgNumericAsValue() {
- assumeFalse(
- "PgNumeric is not supported in the emulator", EmulatorSpannerHelper.isUsingEmulator());
databaseClient
.readWriteTransaction()
.run(
@@ -455,7 +441,9 @@ public void testMutationsWithPgNumericAsValue() {
});
try (ResultSet resultSet =
- databaseClient.singleUse().executeQuery(Statement.of("SELECT * FROM " + tableName))) {
+ databaseClient
+ .singleUse()
+ .executeQuery(Statement.of("SELECT * FROM " + tableName + " ORDER BY id"))) {
resultSet.next();
assertEquals("1.23", resultSet.getString("col1"));
diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITPitrCreateDatabaseTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITPitrCreateDatabaseTest.java
index f9fa081e413..6056b857b18 100644
--- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITPitrCreateDatabaseTest.java
+++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITPitrCreateDatabaseTest.java
@@ -30,6 +30,7 @@
import com.google.cloud.spanner.ParallelIntegrationTest;
import com.google.cloud.spanner.SpannerException;
import com.google.cloud.spanner.testing.RemoteSpannerHelper;
+import java.time.Duration;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
@@ -42,7 +43,6 @@
import org.junit.experimental.categories.Category;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
-import org.threeten.bp.Duration;
@Category(ParallelIntegrationTest.class)
@RunWith(JUnit4.class)
diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITPitrUpdateDatabaseTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITPitrUpdateDatabaseTest.java
index fa756b2f277..c730a7fa36c 100644
--- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITPitrUpdateDatabaseTest.java
+++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITPitrUpdateDatabaseTest.java
@@ -35,6 +35,7 @@
import com.google.cloud.spanner.Statement;
import com.google.cloud.spanner.testing.RemoteSpannerHelper;
import com.google.spanner.admin.database.v1.UpdateDatabaseDdlMetadata;
+import java.time.Duration;
import java.util.Collections;
import java.util.List;
import java.util.concurrent.TimeUnit;
@@ -45,7 +46,6 @@
import org.junit.experimental.categories.Category;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
-import org.threeten.bp.Duration;
@Category(ParallelIntegrationTest.class)
@RunWith(JUnit4.class)
diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITWriteTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITWriteTest.java
index 17f5f8e0ec9..c5eb9284479 100644
--- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITWriteTest.java
+++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/ITWriteTest.java
@@ -19,6 +19,7 @@
import static com.google.cloud.spanner.SpannerMatchers.isSpannerException;
import static com.google.cloud.spanner.Type.array;
import static com.google.cloud.spanner.Type.json;
+import static com.google.cloud.spanner.Type.pgJsonb;
import static com.google.cloud.spanner.testing.EmulatorSpannerHelper.isUsingEmulator;
import static com.google.common.truth.Truth.assertThat;
import static org.junit.Assert.assertArrayEquals;
@@ -54,7 +55,6 @@
import com.google.cloud.spanner.Type;
import com.google.cloud.spanner.Value;
import com.google.cloud.spanner.connection.ConnectionOptions;
-import com.google.cloud.spanner.testing.EmulatorSpannerHelper;
import com.google.common.collect.ImmutableList;
import com.google.protobuf.NullValue;
import com.google.rpc.Code;
@@ -98,9 +98,7 @@ public class ITWriteTest {
public static List data() {
List params = new ArrayList<>();
params.add(new DialectTestParameter(Dialect.GOOGLE_STANDARD_SQL));
- if (!EmulatorSpannerHelper.isUsingEmulator()) {
- params.add(new DialectTestParameter(Dialect.POSTGRESQL));
- }
+ params.add(new DialectTestParameter(Dialect.POSTGRESQL));
return params;
}
@@ -149,7 +147,7 @@ public static List data() {
+ " StringValue VARCHAR,"
+ " JsonValue JSONB,"
+ " BytesValue BYTEA,"
- + " TimestampValue TIMESTAMPTZ,"
+ + " TimestampValue SPANNER.COMMIT_TIMESTAMP,"
+ " DateValue DATE,"
+ " NumericValue NUMERIC,"
+ " BoolArrayValue BOOL[],"
@@ -181,12 +179,10 @@ public static void setUpDatabase()
env.getTestHelper().createTestDatabase(GOOGLE_STANDARD_SQL_SCHEMA);
googleStandardSQLClient = env.getTestHelper().getDatabaseClient(googleStandardSQLDatabase);
- if (!EmulatorSpannerHelper.isUsingEmulator()) {
- Database postgreSQLDatabase =
- env.getTestHelper()
- .createTestDatabase(Dialect.POSTGRESQL, Arrays.asList(POSTGRESQL_SCHEMA));
- postgreSQLClient = env.getTestHelper().getDatabaseClient(postgreSQLDatabase);
- }
+ Database postgreSQLDatabase =
+ env.getTestHelper()
+ .createTestDatabase(Dialect.POSTGRESQL, Arrays.asList(POSTGRESQL_SCHEMA));
+ postgreSQLClient = env.getTestHelper().getDatabaseClient(postgreSQLDatabase);
}
@Before
@@ -481,31 +477,42 @@ public void writeStringNull() {
@Test
public void writeJson() {
- assumeFalse("PostgreSQL does not yet support JSON", dialect.dialect == Dialect.POSTGRESQL);
write(baseInsert().set("JsonValue").to(Value.json("{\"rating\":9,\"open\":true}")).build());
Struct row = readLastRow("JsonValue");
assertThat(row.isNull(0)).isFalse();
- assertThat(row.getColumnType("JsonValue")).isEqualTo(json());
- assertThat(row.getJson(0)).isEqualTo("{\"open\":true,\"rating\":9}");
+ if (dialect.dialect == Dialect.POSTGRESQL) {
+ assertThat(row.getColumnType("jsonvalue")).isEqualTo(pgJsonb());
+ assertThat(row.getPgJsonb(0)).isEqualTo("{\"open\": true, \"rating\": 9}");
+ } else {
+ assertThat(row.getColumnType("JsonValue")).isEqualTo(json());
+ assertThat(row.getJson(0)).isEqualTo("{\"open\":true,\"rating\":9}");
+ }
}
@Test
public void writeJsonEmpty() {
- assumeFalse("PostgreSQL does not yet support JSON", dialect.dialect == Dialect.POSTGRESQL);
write(baseInsert().set("JsonValue").to(Value.json("{}")).build());
Struct row = readLastRow("JsonValue");
assertThat(row.isNull(0)).isFalse();
- assertThat(row.getColumnType("JsonValue")).isEqualTo(json());
- assertThat(row.getJson(0)).isEqualTo("{}");
+ if (dialect.dialect == Dialect.POSTGRESQL) {
+ assertThat(row.getColumnType("jsonvalue")).isEqualTo(pgJsonb());
+ assertThat(row.getPgJsonb(0)).isEqualTo("{}");
+ } else {
+ assertThat(row.getColumnType("JsonValue")).isEqualTo(json());
+ assertThat(row.getJson(0)).isEqualTo("{}");
+ }
}
@Test
public void writeJsonNull() {
- assumeFalse("PostgreSQL does not yet support JSON", dialect.dialect == Dialect.POSTGRESQL);
write(baseInsert().set("JsonValue").to(Value.json(null)).build());
Struct row = readLastRow("JsonValue");
assertThat(row.isNull(0)).isTrue();
- assertThat(row.getColumnType("JsonValue")).isEqualTo(json());
+ if (dialect.dialect == Dialect.POSTGRESQL) {
+ assertThat(row.getColumnType("jsonvalue")).isEqualTo(pgJsonb());
+ } else {
+ assertThat(row.getColumnType("JsonValue")).isEqualTo(json());
+ }
}
@Test
@@ -626,8 +633,6 @@ public void writeBytesNull() {
@Test
public void writeTimestamp() {
- assumeFalse(
- "PostgresSQL does not yet support Timestamp", dialect.dialect == Dialect.POSTGRESQL);
Timestamp timestamp = Timestamp.parseTimestamp("2016-09-15T00:00:00.111111Z");
write(baseInsert().set("TimestampValue").to(timestamp).build());
Struct row = readLastRow("TimestampValue");
@@ -644,8 +649,6 @@ public void writeTimestampNull() {
@Test
public void writeCommitTimestamp() {
- assumeFalse(
- "PostgreSQL does not yet support Commit Timestamp", dialect.dialect == Dialect.POSTGRESQL);
Timestamp commitTimestamp =
write(baseInsert().set("TimestampValue").to(Value.COMMIT_TIMESTAMP).build());
Struct row = readLastRow("TimestampValue");
@@ -830,36 +833,46 @@ public void writeStringArray() {
@Test
public void writeJsonArrayNull() {
- assumeFalse("PostgreSQL does not yet support Array", dialect.dialect == Dialect.POSTGRESQL);
write(baseInsert().set("JsonArrayValue").toJsonArray(null).build());
Struct row = readLastRow("JsonArrayValue");
assertThat(row.isNull(0)).isTrue();
- assertThat(row.getColumnType("JsonArrayValue")).isEqualTo(array(json()));
+ if (dialect.dialect == Dialect.POSTGRESQL) {
+ assertThat(row.getColumnType("jsonarrayvalue")).isEqualTo(array(pgJsonb()));
+ } else {
+ assertThat(row.getColumnType("JsonArrayValue")).isEqualTo(array(json()));
+ }
}
@Test
public void writeJsonArrayEmpty() {
- assumeFalse("PostgreSQL does not yet support Array", dialect.dialect == Dialect.POSTGRESQL);
write(baseInsert().set("JsonArrayValue").toJsonArray(Collections.emptyList()).build());
Struct row = readLastRow("JsonArrayValue");
assertThat(row.isNull(0)).isFalse();
- assertThat(row.getColumnType("JsonArrayValue")).isEqualTo(array(json()));
- assertThat(row.getJsonList(0)).containsExactly();
+ if (dialect.dialect == Dialect.POSTGRESQL) {
+ assertThat(row.getColumnType("jsonarrayvalue")).isEqualTo(array(pgJsonb()));
+ assertThat(row.getPgJsonbList(0)).containsExactly();
+ } else {
+ assertThat(row.getColumnType("JsonArrayValue")).isEqualTo(array(json()));
+ assertThat(row.getJsonList(0)).containsExactly();
+ }
}
@Test
public void writeJsonArray() {
- assumeFalse("PostgreSQL does not yet support Array", dialect.dialect == Dialect.POSTGRESQL);
write(baseInsert().set("JsonArrayValue").toJsonArray(Arrays.asList("[]", null, "{}")).build());
Struct row = readLastRow("JsonArrayValue");
assertThat(row.isNull(0)).isFalse();
- assertThat(row.getColumnType("JsonArrayValue")).isEqualTo(array(json()));
- assertThat(row.getJsonList(0)).containsExactly("[]", null, "{}").inOrder();
+ if (dialect.dialect == Dialect.POSTGRESQL) {
+ assertThat(row.getColumnType("jsonarrayvalue")).isEqualTo(array(pgJsonb()));
+ assertThat(row.getPgJsonbList(0)).containsExactly("[]", null, "{}").inOrder();
+ } else {
+ assertThat(row.getColumnType("JsonArrayValue")).isEqualTo(array(json()));
+ assertThat(row.getJsonList(0)).containsExactly("[]", null, "{}").inOrder();
+ }
}
@Test
public void writeJsonArrayNoNulls() {
- assumeFalse("PostgreSQL does not yet support Array", dialect.dialect == Dialect.POSTGRESQL);
write(
baseInsert()
.set("JsonArrayValue")
@@ -867,10 +880,17 @@ public void writeJsonArrayNoNulls() {
.build());
Struct row = readLastRow("JsonArrayValue");
assertThat(row.isNull(0)).isFalse();
- assertThat(row.getColumnType("JsonArrayValue")).isEqualTo(array(json()));
- assertThat(row.getJsonList(0))
- .containsExactly("[]", "{\"color\":\"red\",\"value\":\"#f00\"}", "{}")
- .inOrder();
+ if (dialect.dialect == Dialect.POSTGRESQL) {
+ assertThat(row.getColumnType("jsonarrayvalue")).isEqualTo(array(pgJsonb()));
+ assertThat(row.getPgJsonbList(0))
+ .containsExactly("[]", "{\"color\": \"red\", \"value\": \"#f00\"}", "{}")
+ .inOrder();
+ } else {
+ assertThat(row.getColumnType("JsonArrayValue")).isEqualTo(array(json()));
+ assertThat(row.getJsonList(0))
+ .containsExactly("[]", "{\"color\":\"red\",\"value\":\"#f00\"}", "{}")
+ .inOrder();
+ }
}
@Test
@@ -1430,9 +1450,7 @@ public void testTypeNamesPostgreSQL() {
assertTrue(resultSet.next());
assertEquals("timestampvalue", resultSet.getString("column_name"));
- assertEquals(
- Type.timestamp().getSpannerTypeName(dialect.dialect),
- resultSet.getString("spanner_type"));
+ assertEquals("spanner.commit_timestamp", resultSet.getString("spanner_type"));
assertTrue(resultSet.next());
assertEquals("datevalue", resultSet.getString("column_name"));
diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/slow/ITBackupTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/slow/ITBackupTest.java
index 9deb3289e07..1359046aee0 100644
--- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/slow/ITBackupTest.java
+++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/it/slow/ITBackupTest.java
@@ -717,7 +717,7 @@ private void testPagination() {
Page page = dbAdminClient.listBackups(instanceId, Options.pageSize(1));
assertEquals(1, Iterables.size(page.getValues()));
numBackups++;
- assertTrue(page.hasNextPage());
+ assertFalse(page.hasNextPage());
Set seenPageTokens = new HashSet<>();
seenPageTokens.add("");
while (page.hasNextPage()) {
diff --git a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/spi/v1/GapicSpannerRpcTest.java b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/spi/v1/GapicSpannerRpcTest.java
index b3ff3b8f1c2..a0f236b0fd7 100644
--- a/google-cloud-spanner/src/test/java/com/google/cloud/spanner/spi/v1/GapicSpannerRpcTest.java
+++ b/google-cloud-spanner/src/test/java/com/google/cloud/spanner/spi/v1/GapicSpannerRpcTest.java
@@ -85,6 +85,7 @@
import io.opentelemetry.sdk.trace.samplers.Sampler;
import java.io.IOException;
import java.net.InetSocketAddress;
+import java.time.Duration;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
@@ -96,7 +97,6 @@
import org.junit.runners.Parameterized;
import org.junit.runners.Parameterized.Parameter;
import org.junit.runners.Parameterized.Parameters;
-import org.threeten.bp.Duration;
@RunWith(Parameterized.class)
public class GapicSpannerRpcTest {
@@ -386,7 +386,7 @@ public ApiCallContext configure(
// Sequence numbers are only assigned for DML statements, which means that
// this is an update statement.
if (sqlRequest.getSeqno() > 0L) {
- return context.withTimeout(timeoutHolder.timeout);
+ return context.withTimeoutDuration(timeoutHolder.timeout);
}
}
return null;
diff --git a/google-cloud-spanner/src/test/resources/com/google/cloud/spanner/connection/ClientSideStatementsTest.sql b/google-cloud-spanner/src/test/resources/com/google/cloud/spanner/connection/ClientSideStatementsTest.sql
index 552e75f1097..181f30987d0 100644
--- a/google-cloud-spanner/src/test/resources/com/google/cloud/spanner/connection/ClientSideStatementsTest.sql
+++ b/google-cloud-spanner/src/test/resources/com/google/cloud/spanner/connection/ClientSideStatementsTest.sql
@@ -9895,6 +9895,680 @@ set autocommit = false;
@EXPECT EXCEPTION INVALID_ARGUMENT
set retry_aborts_internally =/-false;
NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+set local retry_aborts_internally = true;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+SET LOCAL RETRY_ABORTS_INTERNALLY = TRUE;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+set local retry_aborts_internally = true;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+ set local retry_aborts_internally = true;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+ set local retry_aborts_internally = true;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+
+
+
+set local retry_aborts_internally = true;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+set local retry_aborts_internally = true ;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+set local retry_aborts_internally = true ;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+set local retry_aborts_internally = true
+
+;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+set local retry_aborts_internally = true;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+set local retry_aborts_internally = true;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+set
+local
+retry_aborts_internally
+=
+true;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+foo set local retry_aborts_internally = true;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local retry_aborts_internally = true bar;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+%set local retry_aborts_internally = true;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local retry_aborts_internally = true%;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local retry_aborts_internally =%true;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+_set local retry_aborts_internally = true;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local retry_aborts_internally = true_;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local retry_aborts_internally =_true;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+&set local retry_aborts_internally = true;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local retry_aborts_internally = true&;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local retry_aborts_internally =&true;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+$set local retry_aborts_internally = true;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local retry_aborts_internally = true$;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local retry_aborts_internally =$true;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+@set local retry_aborts_internally = true;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local retry_aborts_internally = true@;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local retry_aborts_internally =@true;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+!set local retry_aborts_internally = true;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local retry_aborts_internally = true!;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local retry_aborts_internally =!true;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+*set local retry_aborts_internally = true;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local retry_aborts_internally = true*;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local retry_aborts_internally =*true;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+(set local retry_aborts_internally = true;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local retry_aborts_internally = true(;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local retry_aborts_internally =(true;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+)set local retry_aborts_internally = true;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local retry_aborts_internally = true);
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local retry_aborts_internally =)true;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+-set local retry_aborts_internally = true;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local retry_aborts_internally = true-;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local retry_aborts_internally =-true;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
++set local retry_aborts_internally = true;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local retry_aborts_internally = true+;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local retry_aborts_internally =+true;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+-#set local retry_aborts_internally = true;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local retry_aborts_internally = true-#;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local retry_aborts_internally =-#true;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+/set local retry_aborts_internally = true;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local retry_aborts_internally = true/;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local retry_aborts_internally =/true;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+\set local retry_aborts_internally = true;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local retry_aborts_internally = true\;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local retry_aborts_internally =\true;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+?set local retry_aborts_internally = true;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local retry_aborts_internally = true?;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local retry_aborts_internally =?true;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+-/set local retry_aborts_internally = true;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local retry_aborts_internally = true-/;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local retry_aborts_internally =-/true;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+/#set local retry_aborts_internally = true;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local retry_aborts_internally = true/#;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local retry_aborts_internally =/#true;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+/-set local retry_aborts_internally = true;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local retry_aborts_internally = true/-;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local retry_aborts_internally =/-true;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+set local retry_aborts_internally = false;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+SET LOCAL RETRY_ABORTS_INTERNALLY = FALSE;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+set local retry_aborts_internally = false;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+ set local retry_aborts_internally = false;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+ set local retry_aborts_internally = false;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+
+
+
+set local retry_aborts_internally = false;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+set local retry_aborts_internally = false ;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+set local retry_aborts_internally = false ;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+set local retry_aborts_internally = false
+
+;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+set local retry_aborts_internally = false;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+set local retry_aborts_internally = false;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+set
+local
+retry_aborts_internally
+=
+false;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+foo set local retry_aborts_internally = false;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local retry_aborts_internally = false bar;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+%set local retry_aborts_internally = false;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local retry_aborts_internally = false%;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local retry_aborts_internally =%false;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+_set local retry_aborts_internally = false;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local retry_aborts_internally = false_;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local retry_aborts_internally =_false;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+&set local retry_aborts_internally = false;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local retry_aborts_internally = false&;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local retry_aborts_internally =&false;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+$set local retry_aborts_internally = false;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local retry_aborts_internally = false$;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local retry_aborts_internally =$false;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+@set local retry_aborts_internally = false;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local retry_aborts_internally = false@;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local retry_aborts_internally =@false;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+!set local retry_aborts_internally = false;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local retry_aborts_internally = false!;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local retry_aborts_internally =!false;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+*set local retry_aborts_internally = false;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local retry_aborts_internally = false*;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local retry_aborts_internally =*false;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+(set local retry_aborts_internally = false;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local retry_aborts_internally = false(;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local retry_aborts_internally =(false;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+)set local retry_aborts_internally = false;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local retry_aborts_internally = false);
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local retry_aborts_internally =)false;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+-set local retry_aborts_internally = false;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local retry_aborts_internally = false-;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local retry_aborts_internally =-false;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
++set local retry_aborts_internally = false;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local retry_aborts_internally = false+;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local retry_aborts_internally =+false;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+-#set local retry_aborts_internally = false;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local retry_aborts_internally = false-#;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local retry_aborts_internally =-#false;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+/set local retry_aborts_internally = false;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local retry_aborts_internally = false/;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local retry_aborts_internally =/false;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+\set local retry_aborts_internally = false;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local retry_aborts_internally = false\;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local retry_aborts_internally =\false;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+?set local retry_aborts_internally = false;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local retry_aborts_internally = false?;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local retry_aborts_internally =?false;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+-/set local retry_aborts_internally = false;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local retry_aborts_internally = false-/;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local retry_aborts_internally =-/false;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+/#set local retry_aborts_internally = false;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local retry_aborts_internally = false/#;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local retry_aborts_internally =/#false;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+/-set local retry_aborts_internally = false;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local retry_aborts_internally = false/-;
+NEW_CONNECTION;
+set readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local retry_aborts_internally =/-false;
+NEW_CONNECTION;
set autocommit_dml_mode='PARTITIONED_NON_ATOMIC';
NEW_CONNECTION;
SET AUTOCOMMIT_DML_MODE='PARTITIONED_NON_ATOMIC';
diff --git a/google-cloud-spanner/src/test/resources/com/google/cloud/spanner/connection/ConnectionImplGeneratedSqlScriptTest.sql b/google-cloud-spanner/src/test/resources/com/google/cloud/spanner/connection/ConnectionImplGeneratedSqlScriptTest.sql
index 5985ba92479..5dcf6577d5b 100644
--- a/google-cloud-spanner/src/test/resources/com/google/cloud/spanner/connection/ConnectionImplGeneratedSqlScriptTest.sql
+++ b/google-cloud-spanner/src/test/resources/com/google/cloud/spanner/connection/ConnectionImplGeneratedSqlScriptTest.sql
@@ -160,15 +160,15 @@ NEW_CONNECTION;
SET READONLY=TRUE;
SET AUTOCOMMIT=FALSE;
COMMIT;
-SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:10.066000000Z';
-@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2024-11-25T10:49:10.066000000Z'
+SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:24.280000000Z';
+@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2024-12-07T16:05:24.280000000Z'
SHOW VARIABLE READ_ONLY_STALENESS;
NEW_CONNECTION;
SET READONLY=TRUE;
SET AUTOCOMMIT=FALSE;
COMMIT;
@EXPECT EXCEPTION FAILED_PRECONDITION
-SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:10.066000000Z';
+SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:24.280000000Z';
NEW_CONNECTION;
SET READONLY=TRUE;
SET AUTOCOMMIT=FALSE;
@@ -510,15 +510,15 @@ NEW_CONNECTION;
SET READONLY=TRUE;
SET AUTOCOMMIT=FALSE;
SET READ_ONLY_STALENESS='EXACT_STALENESS 10s';
-SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:10.187000000Z';
-@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2024-11-25T10:49:10.187000000Z'
+SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:24.405000000Z';
+@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2024-12-07T16:05:24.405000000Z'
SHOW VARIABLE READ_ONLY_STALENESS;
NEW_CONNECTION;
SET READONLY=TRUE;
SET AUTOCOMMIT=FALSE;
SET READ_ONLY_STALENESS='EXACT_STALENESS 10s';
@EXPECT EXCEPTION FAILED_PRECONDITION
-SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:10.187000000Z';
+SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:24.405000000Z';
NEW_CONNECTION;
SET READONLY=TRUE;
SET AUTOCOMMIT=FALSE;
@@ -950,8 +950,8 @@ BEGIN TRANSACTION;
@EXPECT RESULT_SET 'TEST',1
SELECT 1 AS TEST;
ROLLBACK;
-SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:10.294000000Z';
-@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2024-11-25T10:49:10.294000000Z'
+SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:24.518000000Z';
+@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2024-12-07T16:05:24.518000000Z'
SHOW VARIABLE READ_ONLY_STALENESS;
NEW_CONNECTION;
SET READONLY=TRUE;
@@ -961,7 +961,7 @@ BEGIN TRANSACTION;
SELECT 1 AS TEST;
ROLLBACK;
@EXPECT EXCEPTION FAILED_PRECONDITION
-SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:10.294000000Z';
+SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:24.518000000Z';
NEW_CONNECTION;
SET READONLY=TRUE;
SET AUTOCOMMIT=FALSE;
@@ -1462,8 +1462,8 @@ BEGIN TRANSACTION;
@EXPECT RESULT_SET 'TEST',1
SELECT 1 AS TEST;
COMMIT;
-SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:10.413000000Z';
-@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2024-11-25T10:49:10.413000000Z'
+SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:24.636000000Z';
+@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2024-12-07T16:05:24.636000000Z'
SHOW VARIABLE READ_ONLY_STALENESS;
NEW_CONNECTION;
SET READONLY=TRUE;
@@ -1473,7 +1473,7 @@ BEGIN TRANSACTION;
SELECT 1 AS TEST;
COMMIT;
@EXPECT EXCEPTION FAILED_PRECONDITION
-SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:10.413000000Z';
+SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:24.636000000Z';
NEW_CONNECTION;
SET READONLY=TRUE;
SET AUTOCOMMIT=FALSE;
@@ -1876,15 +1876,15 @@ NEW_CONNECTION;
SET READONLY=TRUE;
SET AUTOCOMMIT=FALSE;
BEGIN TRANSACTION;
-SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:10.523000000Z';
-@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2024-11-25T10:49:10.523000000Z'
+SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:24.733000000Z';
+@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2024-12-07T16:05:24.733000000Z'
SHOW VARIABLE READ_ONLY_STALENESS;
NEW_CONNECTION;
SET READONLY=TRUE;
SET AUTOCOMMIT=FALSE;
BEGIN TRANSACTION;
@EXPECT EXCEPTION FAILED_PRECONDITION
-SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:10.523000000Z';
+SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:24.733000000Z';
NEW_CONNECTION;
SET READONLY=TRUE;
SET AUTOCOMMIT=FALSE;
@@ -2243,14 +2243,14 @@ SET AUTOCOMMIT=FALSE;
@EXPECT RESULT_SET 'TEST',1
SELECT 1 AS TEST;
@EXPECT EXCEPTION FAILED_PRECONDITION
-SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:10.613000000Z';
+SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:24.812000000Z';
NEW_CONNECTION;
SET READONLY=TRUE;
SET AUTOCOMMIT=FALSE;
@EXPECT RESULT_SET 'TEST',1
SELECT 1 AS TEST;
@EXPECT EXCEPTION FAILED_PRECONDITION
-SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:10.613000000Z';
+SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:24.812000000Z';
NEW_CONNECTION;
SET READONLY=TRUE;
SET AUTOCOMMIT=FALSE;
@@ -2600,13 +2600,13 @@ SET READONLY=TRUE;
SET AUTOCOMMIT=FALSE;
SELECT 1 AS TEST;
@EXPECT EXCEPTION FAILED_PRECONDITION
-SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:10.705000000Z';
+SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:24.901000000Z';
NEW_CONNECTION;
SET READONLY=TRUE;
SET AUTOCOMMIT=FALSE;
SELECT 1 AS TEST;
@EXPECT EXCEPTION FAILED_PRECONDITION
-SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:10.705000000Z';
+SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:24.901000000Z';
NEW_CONNECTION;
SET READONLY=TRUE;
SET AUTOCOMMIT=FALSE;
@@ -2910,14 +2910,14 @@ SHOW VARIABLE READ_ONLY_STALENESS;
NEW_CONNECTION;
SET READONLY=TRUE;
SET AUTOCOMMIT=FALSE;
-SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:10.790000000Z';
-@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2024-11-25T10:49:10.790000000Z'
+SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:24.978000000Z';
+@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2024-12-07T16:05:24.978000000Z'
SHOW VARIABLE READ_ONLY_STALENESS;
NEW_CONNECTION;
SET READONLY=TRUE;
SET AUTOCOMMIT=FALSE;
@EXPECT EXCEPTION FAILED_PRECONDITION
-SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:10.790000000Z';
+SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:24.978000000Z';
NEW_CONNECTION;
SET READONLY=TRUE;
SET AUTOCOMMIT=FALSE;
@@ -3245,15 +3245,15 @@ NEW_CONNECTION;
SET READONLY=FALSE;
SET AUTOCOMMIT=FALSE;
COMMIT;
-SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:10.890000000Z';
-@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2024-11-25T10:49:10.890000000Z'
+SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:25.078000000Z';
+@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2024-12-07T16:05:25.078000000Z'
SHOW VARIABLE READ_ONLY_STALENESS;
NEW_CONNECTION;
SET READONLY=FALSE;
SET AUTOCOMMIT=FALSE;
COMMIT;
@EXPECT EXCEPTION FAILED_PRECONDITION
-SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:10.890000000Z';
+SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:25.078000000Z';
NEW_CONNECTION;
SET READONLY=FALSE;
SET AUTOCOMMIT=FALSE;
@@ -3662,8 +3662,8 @@ SET AUTOCOMMIT=FALSE;
START BATCH DDL;
CREATE TABLE foo (id INT64 NOT NULL, name STRING(100)) PRIMARY KEY (id);
RUN BATCH;
-SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:10.965000000Z';
-@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2024-11-25T10:49:10.965000000Z'
+SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:25.149000000Z';
+@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2024-12-07T16:05:25.149000000Z'
SHOW VARIABLE READ_ONLY_STALENESS;
NEW_CONNECTION;
SET READONLY=FALSE;
@@ -3672,7 +3672,7 @@ START BATCH DDL;
CREATE TABLE foo (id INT64 NOT NULL, name STRING(100)) PRIMARY KEY (id);
RUN BATCH;
@EXPECT EXCEPTION FAILED_PRECONDITION
-SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:10.965000000Z';
+SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:25.149000000Z';
NEW_CONNECTION;
SET READONLY=FALSE;
SET AUTOCOMMIT=FALSE;
@@ -4081,14 +4081,14 @@ SET AUTOCOMMIT=FALSE;
START BATCH DDL;
CREATE TABLE foo (id INT64 NOT NULL, name STRING(100)) PRIMARY KEY (id);
@EXPECT EXCEPTION FAILED_PRECONDITION
-SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:11.043000000Z';
+SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:25.223000000Z';
NEW_CONNECTION;
SET READONLY=FALSE;
SET AUTOCOMMIT=FALSE;
START BATCH DDL;
CREATE TABLE foo (id INT64 NOT NULL, name STRING(100)) PRIMARY KEY (id);
@EXPECT EXCEPTION FAILED_PRECONDITION
-SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:11.043000000Z';
+SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:25.223000000Z';
NEW_CONNECTION;
SET READONLY=FALSE;
SET AUTOCOMMIT=FALSE;
@@ -4438,13 +4438,13 @@ SET READONLY=FALSE;
SET AUTOCOMMIT=FALSE;
START BATCH DDL;
@EXPECT EXCEPTION FAILED_PRECONDITION
-SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:11.113000000Z';
+SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:25.284000000Z';
NEW_CONNECTION;
SET READONLY=FALSE;
SET AUTOCOMMIT=FALSE;
START BATCH DDL;
@EXPECT EXCEPTION FAILED_PRECONDITION
-SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:11.113000000Z';
+SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:25.284000000Z';
NEW_CONNECTION;
SET READONLY=FALSE;
SET AUTOCOMMIT=FALSE;
@@ -4877,8 +4877,8 @@ SET TRANSACTION READ ONLY;
@EXPECT RESULT_SET 'TEST',1
SELECT 1 AS TEST;
COMMIT;
-SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:11.181000000Z';
-@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2024-11-25T10:49:11.181000000Z'
+SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:25.349000000Z';
+@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2024-12-07T16:05:25.349000000Z'
SHOW VARIABLE READ_ONLY_STALENESS;
NEW_CONNECTION;
SET READONLY=FALSE;
@@ -4888,7 +4888,7 @@ SET TRANSACTION READ ONLY;
SELECT 1 AS TEST;
COMMIT;
@EXPECT EXCEPTION FAILED_PRECONDITION
-SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:11.181000000Z';
+SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:25.349000000Z';
NEW_CONNECTION;
SET READONLY=FALSE;
SET AUTOCOMMIT=FALSE;
@@ -5288,15 +5288,15 @@ NEW_CONNECTION;
SET READONLY=FALSE;
SET AUTOCOMMIT=FALSE;
SET TRANSACTION READ ONLY;
-SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:11.260000000Z';
-@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2024-11-25T10:49:11.260000000Z'
+SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:25.424000000Z';
+@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2024-12-07T16:05:25.424000000Z'
SHOW VARIABLE READ_ONLY_STALENESS;
NEW_CONNECTION;
SET READONLY=FALSE;
SET AUTOCOMMIT=FALSE;
SET TRANSACTION READ ONLY;
@EXPECT EXCEPTION FAILED_PRECONDITION
-SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:11.260000000Z';
+SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:25.424000000Z';
NEW_CONNECTION;
SET READONLY=FALSE;
SET AUTOCOMMIT=FALSE;
@@ -5641,15 +5641,15 @@ NEW_CONNECTION;
SET READONLY=FALSE;
SET AUTOCOMMIT=FALSE;
SET READ_ONLY_STALENESS='EXACT_STALENESS 10s';
-SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:11.330000000Z';
-@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2024-11-25T10:49:11.330000000Z'
+SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:25.488000000Z';
+@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2024-12-07T16:05:25.488000000Z'
SHOW VARIABLE READ_ONLY_STALENESS;
NEW_CONNECTION;
SET READONLY=FALSE;
SET AUTOCOMMIT=FALSE;
SET READ_ONLY_STALENESS='EXACT_STALENESS 10s';
@EXPECT EXCEPTION FAILED_PRECONDITION
-SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:11.330000000Z';
+SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:25.488000000Z';
NEW_CONNECTION;
SET READONLY=FALSE;
SET AUTOCOMMIT=FALSE;
@@ -6088,8 +6088,8 @@ BEGIN TRANSACTION;
@EXPECT RESULT_SET 'TEST',1
SELECT 1 AS TEST;
ROLLBACK;
-SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:11.402000000Z';
-@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2024-11-25T10:49:11.402000000Z'
+SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:25.558000000Z';
+@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2024-12-07T16:05:25.558000000Z'
SHOW VARIABLE READ_ONLY_STALENESS;
NEW_CONNECTION;
SET READONLY=FALSE;
@@ -6099,7 +6099,7 @@ BEGIN TRANSACTION;
SELECT 1 AS TEST;
ROLLBACK;
@EXPECT EXCEPTION FAILED_PRECONDITION
-SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:11.402000000Z';
+SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:25.558000000Z';
NEW_CONNECTION;
SET READONLY=FALSE;
SET AUTOCOMMIT=FALSE;
@@ -6607,8 +6607,8 @@ BEGIN TRANSACTION;
@EXPECT RESULT_SET 'TEST',1
SELECT 1 AS TEST;
COMMIT;
-SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:11.495000000Z';
-@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2024-11-25T10:49:11.495000000Z'
+SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:25.646000000Z';
+@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2024-12-07T16:05:25.646000000Z'
SHOW VARIABLE READ_ONLY_STALENESS;
NEW_CONNECTION;
SET READONLY=FALSE;
@@ -6618,7 +6618,7 @@ BEGIN TRANSACTION;
SELECT 1 AS TEST;
COMMIT;
@EXPECT EXCEPTION FAILED_PRECONDITION
-SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:11.495000000Z';
+SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:25.646000000Z';
NEW_CONNECTION;
SET READONLY=FALSE;
SET AUTOCOMMIT=FALSE;
@@ -7023,15 +7023,15 @@ NEW_CONNECTION;
SET READONLY=FALSE;
SET AUTOCOMMIT=FALSE;
BEGIN TRANSACTION;
-SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:11.578000000Z';
-@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2024-11-25T10:49:11.578000000Z'
+SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:25.725000000Z';
+@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2024-12-07T16:05:25.725000000Z'
SHOW VARIABLE READ_ONLY_STALENESS;
NEW_CONNECTION;
SET READONLY=FALSE;
SET AUTOCOMMIT=FALSE;
BEGIN TRANSACTION;
@EXPECT EXCEPTION FAILED_PRECONDITION
-SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:11.578000000Z';
+SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:25.725000000Z';
NEW_CONNECTION;
SET READONLY=FALSE;
SET AUTOCOMMIT=FALSE;
@@ -7394,14 +7394,14 @@ SET AUTOCOMMIT=FALSE;
@EXPECT RESULT_SET 'TEST',1
SELECT 1 AS TEST;
@EXPECT EXCEPTION FAILED_PRECONDITION
-SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:11.654000000Z';
+SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:25.790000000Z';
NEW_CONNECTION;
SET READONLY=FALSE;
SET AUTOCOMMIT=FALSE;
@EXPECT RESULT_SET 'TEST',1
SELECT 1 AS TEST;
@EXPECT EXCEPTION FAILED_PRECONDITION
-SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:11.654000000Z';
+SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:25.790000000Z';
NEW_CONNECTION;
SET READONLY=FALSE;
SET AUTOCOMMIT=FALSE;
@@ -7756,13 +7756,13 @@ SET READONLY=FALSE;
SET AUTOCOMMIT=FALSE;
SELECT 1 AS TEST;
@EXPECT EXCEPTION FAILED_PRECONDITION
-SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:11.734000000Z';
+SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:25.868000000Z';
NEW_CONNECTION;
SET READONLY=FALSE;
SET AUTOCOMMIT=FALSE;
SELECT 1 AS TEST;
@EXPECT EXCEPTION FAILED_PRECONDITION
-SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:11.734000000Z';
+SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:25.868000000Z';
NEW_CONNECTION;
SET READONLY=FALSE;
SET AUTOCOMMIT=FALSE;
@@ -8075,14 +8075,14 @@ SHOW VARIABLE READ_ONLY_STALENESS;
NEW_CONNECTION;
SET READONLY=FALSE;
SET AUTOCOMMIT=FALSE;
-SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:11.805000000Z';
-@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2024-11-25T10:49:11.805000000Z'
+SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:25.940000000Z';
+@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2024-12-07T16:05:25.940000000Z'
SHOW VARIABLE READ_ONLY_STALENESS;
NEW_CONNECTION;
SET READONLY=FALSE;
SET AUTOCOMMIT=FALSE;
@EXPECT EXCEPTION FAILED_PRECONDITION
-SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:11.805000000Z';
+SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:25.940000000Z';
NEW_CONNECTION;
SET READONLY=FALSE;
SET AUTOCOMMIT=FALSE;
@@ -8392,13 +8392,13 @@ SET READONLY=FALSE;
SET AUTOCOMMIT=TRUE;
START BATCH DDL;
@EXPECT EXCEPTION FAILED_PRECONDITION
-SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:11.865000000Z';
+SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:26Z';
NEW_CONNECTION;
SET READONLY=FALSE;
SET AUTOCOMMIT=TRUE;
START BATCH DDL;
@EXPECT EXCEPTION FAILED_PRECONDITION
-SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:11.865000000Z';
+SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:26Z';
NEW_CONNECTION;
SET READONLY=FALSE;
SET AUTOCOMMIT=TRUE;
@@ -8753,8 +8753,8 @@ SET READONLY=FALSE;
SET AUTOCOMMIT=TRUE;
BEGIN TRANSACTION;
SET TRANSACTION READ ONLY;
-SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:11.924000000Z';
-@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2024-11-25T10:49:11.924000000Z'
+SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:26.061000000Z';
+@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2024-12-07T16:05:26.061000000Z'
SHOW VARIABLE READ_ONLY_STALENESS;
NEW_CONNECTION;
SET READONLY=FALSE;
@@ -8762,7 +8762,7 @@ SET AUTOCOMMIT=TRUE;
BEGIN TRANSACTION;
SET TRANSACTION READ ONLY;
@EXPECT EXCEPTION FAILED_PRECONDITION
-SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:11.924000000Z';
+SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:26.061000000Z';
NEW_CONNECTION;
SET READONLY=FALSE;
SET AUTOCOMMIT=TRUE;
@@ -9200,8 +9200,8 @@ SET AUTOCOMMIT=TRUE;
BEGIN TRANSACTION;
UPDATE foo SET bar=1;
COMMIT;
-SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:11.991000000Z';
-@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2024-11-25T10:49:11.991000000Z'
+SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:26.128000000Z';
+@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2024-12-07T16:05:26.128000000Z'
SHOW VARIABLE READ_ONLY_STALENESS;
NEW_CONNECTION;
SET READONLY=FALSE;
@@ -9209,8 +9209,8 @@ SET AUTOCOMMIT=TRUE;
BEGIN TRANSACTION;
UPDATE foo SET bar=1;
COMMIT;
-SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:11.991000000Z';
-@EXPECT RESULT_SET 'READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2024-11-25T10:49:11.991000000Z'
+SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:26.128000000Z';
+@EXPECT RESULT_SET 'READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2024-12-07T16:05:26.128000000Z'
SHOW VARIABLE READ_ONLY_STALENESS;
NEW_CONNECTION;
SET READONLY=FALSE;
@@ -9596,15 +9596,15 @@ NEW_CONNECTION;
SET READONLY=FALSE;
SET AUTOCOMMIT=TRUE;
BEGIN TRANSACTION;
-SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:12.064000000Z';
-@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2024-11-25T10:49:12.064000000Z'
+SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:26.200000000Z';
+@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2024-12-07T16:05:26.200000000Z'
SHOW VARIABLE READ_ONLY_STALENESS;
NEW_CONNECTION;
SET READONLY=FALSE;
SET AUTOCOMMIT=TRUE;
BEGIN TRANSACTION;
@EXPECT EXCEPTION FAILED_PRECONDITION
-SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:12.064000000Z';
+SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:26.200000000Z';
NEW_CONNECTION;
SET READONLY=FALSE;
SET AUTOCOMMIT=TRUE;
@@ -9958,15 +9958,15 @@ NEW_CONNECTION;
SET READONLY=FALSE;
SET AUTOCOMMIT=TRUE;
CREATE TABLE foo (id INT64 NOT NULL, name STRING(100)) PRIMARY KEY (id);
-SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:12.125000000Z';
-@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2024-11-25T10:49:12.125000000Z'
+SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:26.258000000Z';
+@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2024-12-07T16:05:26.258000000Z'
SHOW VARIABLE READ_ONLY_STALENESS;
NEW_CONNECTION;
SET READONLY=FALSE;
SET AUTOCOMMIT=TRUE;
CREATE TABLE foo (id INT64 NOT NULL, name STRING(100)) PRIMARY KEY (id);
-SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:12.125000000Z';
-@EXPECT RESULT_SET 'READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2024-11-25T10:49:12.125000000Z'
+SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:26.258000000Z';
+@EXPECT RESULT_SET 'READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2024-12-07T16:05:26.258000000Z'
SHOW VARIABLE READ_ONLY_STALENESS;
NEW_CONNECTION;
SET READONLY=FALSE;
@@ -10329,15 +10329,15 @@ NEW_CONNECTION;
SET READONLY=FALSE;
SET AUTOCOMMIT=TRUE;
UPDATE foo SET bar=1;
-SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:12.193000000Z';
-@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2024-11-25T10:49:12.193000000Z'
+SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:26.325000000Z';
+@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2024-12-07T16:05:26.325000000Z'
SHOW VARIABLE READ_ONLY_STALENESS;
NEW_CONNECTION;
SET READONLY=FALSE;
SET AUTOCOMMIT=TRUE;
UPDATE foo SET bar=1;
-SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:12.193000000Z';
-@EXPECT RESULT_SET 'READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2024-11-25T10:49:12.193000000Z'
+SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:26.325000000Z';
+@EXPECT RESULT_SET 'READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2024-12-07T16:05:26.325000000Z'
SHOW VARIABLE READ_ONLY_STALENESS;
NEW_CONNECTION;
SET READONLY=FALSE;
@@ -10730,16 +10730,16 @@ SET READONLY=FALSE;
SET AUTOCOMMIT=TRUE;
@EXPECT RESULT_SET 'TEST',1
SELECT 1 AS TEST;
-SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:12.262000000Z';
-@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2024-11-25T10:49:12.262000000Z'
+SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:26.390000000Z';
+@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2024-12-07T16:05:26.390000000Z'
SHOW VARIABLE READ_ONLY_STALENESS;
NEW_CONNECTION;
SET READONLY=FALSE;
SET AUTOCOMMIT=TRUE;
@EXPECT RESULT_SET 'TEST',1
SELECT 1 AS TEST;
-SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:12.262000000Z';
-@EXPECT RESULT_SET 'READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2024-11-25T10:49:12.262000000Z'
+SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:26.390000000Z';
+@EXPECT RESULT_SET 'READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2024-12-07T16:05:26.390000000Z'
SHOW VARIABLE READ_ONLY_STALENESS;
NEW_CONNECTION;
SET READONLY=FALSE;
@@ -11125,15 +11125,15 @@ NEW_CONNECTION;
SET READONLY=FALSE;
SET AUTOCOMMIT=TRUE;
SELECT 1 AS TEST;
-SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:12.330000000Z';
-@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2024-11-25T10:49:12.330000000Z'
+SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:26.456000000Z';
+@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2024-12-07T16:05:26.456000000Z'
SHOW VARIABLE READ_ONLY_STALENESS;
NEW_CONNECTION;
SET READONLY=FALSE;
SET AUTOCOMMIT=TRUE;
SELECT 1 AS TEST;
-SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:12.330000000Z';
-@EXPECT RESULT_SET 'READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2024-11-25T10:49:12.330000000Z'
+SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:26.456000000Z';
+@EXPECT RESULT_SET 'READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2024-12-07T16:05:26.456000000Z'
SHOW VARIABLE READ_ONLY_STALENESS;
NEW_CONNECTION;
SET READONLY=FALSE;
@@ -11466,14 +11466,14 @@ SHOW VARIABLE READ_ONLY_STALENESS;
NEW_CONNECTION;
SET READONLY=FALSE;
SET AUTOCOMMIT=TRUE;
-SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:12.396000000Z';
-@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2024-11-25T10:49:12.396000000Z'
+SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:26.538000000Z';
+@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2024-12-07T16:05:26.538000000Z'
SHOW VARIABLE READ_ONLY_STALENESS;
NEW_CONNECTION;
SET READONLY=FALSE;
SET AUTOCOMMIT=TRUE;
-SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:12.396000000Z';
-@EXPECT RESULT_SET 'READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2024-11-25T10:49:12.396000000Z'
+SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:26.538000000Z';
+@EXPECT RESULT_SET 'READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2024-12-07T16:05:26.538000000Z'
SHOW VARIABLE READ_ONLY_STALENESS;
NEW_CONNECTION;
SET READONLY=FALSE;
@@ -11796,15 +11796,15 @@ NEW_CONNECTION;
SET READONLY=TRUE;
SET AUTOCOMMIT=TRUE;
SET READ_ONLY_STALENESS='MAX_STALENESS 10s';
-SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:12.456000000Z';
-@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2024-11-25T10:49:12.456000000Z'
+SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:26.595000000Z';
+@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2024-12-07T16:05:26.595000000Z'
SHOW VARIABLE READ_ONLY_STALENESS;
NEW_CONNECTION;
SET READONLY=TRUE;
SET AUTOCOMMIT=TRUE;
SET READ_ONLY_STALENESS='MAX_STALENESS 10s';
-SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:12.456000000Z';
-@EXPECT RESULT_SET 'READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2024-11-25T10:49:12.456000000Z'
+SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:26.595000000Z';
+@EXPECT RESULT_SET 'READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2024-12-07T16:05:26.595000000Z'
SHOW VARIABLE READ_ONLY_STALENESS;
NEW_CONNECTION;
SET READONLY=TRUE;
@@ -12211,8 +12211,8 @@ SET AUTOCOMMIT=TRUE;
BEGIN TRANSACTION;
SELECT 1 AS TEST;
COMMIT;
-SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:12.519000000Z';
-@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2024-11-25T10:49:12.519000000Z'
+SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:26.658000000Z';
+@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2024-12-07T16:05:26.658000000Z'
SHOW VARIABLE READ_ONLY_STALENESS;
NEW_CONNECTION;
SET READONLY=TRUE;
@@ -12220,8 +12220,8 @@ SET AUTOCOMMIT=TRUE;
BEGIN TRANSACTION;
SELECT 1 AS TEST;
COMMIT;
-SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:12.519000000Z';
-@EXPECT RESULT_SET 'READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2024-11-25T10:49:12.519000000Z'
+SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:26.658000000Z';
+@EXPECT RESULT_SET 'READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2024-12-07T16:05:26.658000000Z'
SHOW VARIABLE READ_ONLY_STALENESS;
NEW_CONNECTION;
SET READONLY=TRUE;
@@ -12604,15 +12604,15 @@ NEW_CONNECTION;
SET READONLY=TRUE;
SET AUTOCOMMIT=TRUE;
BEGIN TRANSACTION;
-SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:12.586000000Z';
-@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2024-11-25T10:49:12.586000000Z'
+SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:26.723000000Z';
+@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2024-12-07T16:05:26.723000000Z'
SHOW VARIABLE READ_ONLY_STALENESS;
NEW_CONNECTION;
SET READONLY=TRUE;
SET AUTOCOMMIT=TRUE;
BEGIN TRANSACTION;
@EXPECT EXCEPTION FAILED_PRECONDITION
-SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:12.586000000Z';
+SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:26.723000000Z';
NEW_CONNECTION;
SET READONLY=TRUE;
SET AUTOCOMMIT=TRUE;
@@ -12950,15 +12950,15 @@ NEW_CONNECTION;
SET READONLY=TRUE;
SET AUTOCOMMIT=TRUE;
SELECT 1 AS TEST;
-SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:12.650000000Z';
-@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2024-11-25T10:49:12.650000000Z'
+SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:26.781000000Z';
+@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2024-12-07T16:05:26.781000000Z'
SHOW VARIABLE READ_ONLY_STALENESS;
NEW_CONNECTION;
SET READONLY=TRUE;
SET AUTOCOMMIT=TRUE;
SELECT 1 AS TEST;
-SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:12.650000000Z';
-@EXPECT RESULT_SET 'READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2024-11-25T10:49:12.650000000Z'
+SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:26.781000000Z';
+@EXPECT RESULT_SET 'READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2024-12-07T16:05:26.781000000Z'
SHOW VARIABLE READ_ONLY_STALENESS;
NEW_CONNECTION;
SET READONLY=TRUE;
@@ -13305,15 +13305,15 @@ NEW_CONNECTION;
SET READONLY=TRUE;
SET AUTOCOMMIT=TRUE;
SELECT 1 AS TEST;
-SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:12.715000000Z';
-@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2024-11-25T10:49:12.715000000Z'
+SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:26.844000000Z';
+@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2024-12-07T16:05:26.844000000Z'
SHOW VARIABLE READ_ONLY_STALENESS;
NEW_CONNECTION;
SET READONLY=TRUE;
SET AUTOCOMMIT=TRUE;
SELECT 1 AS TEST;
-SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:12.715000000Z';
-@EXPECT RESULT_SET 'READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2024-11-25T10:49:12.715000000Z'
+SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:26.844000000Z';
+@EXPECT RESULT_SET 'READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2024-12-07T16:05:26.844000000Z'
SHOW VARIABLE READ_ONLY_STALENESS;
NEW_CONNECTION;
SET READONLY=TRUE;
@@ -13630,14 +13630,14 @@ SHOW VARIABLE READ_ONLY_STALENESS;
NEW_CONNECTION;
SET READONLY=TRUE;
SET AUTOCOMMIT=TRUE;
-SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:12.778000000Z';
-@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2024-11-25T10:49:12.778000000Z'
+SET READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:26.904000000Z';
+@EXPECT RESULT_SET 'READ_ONLY_STALENESS','READ_TIMESTAMP 2024-12-07T16:05:26.904000000Z'
SHOW VARIABLE READ_ONLY_STALENESS;
NEW_CONNECTION;
SET READONLY=TRUE;
SET AUTOCOMMIT=TRUE;
-SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:12.778000000Z';
-@EXPECT RESULT_SET 'READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2024-11-25T10:49:12.778000000Z'
+SET READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:26.904000000Z';
+@EXPECT RESULT_SET 'READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2024-12-07T16:05:26.904000000Z'
SHOW VARIABLE READ_ONLY_STALENESS;
NEW_CONNECTION;
SET READONLY=TRUE;
diff --git a/google-cloud-spanner/src/test/resources/com/google/cloud/spanner/connection/postgresql/ClientSideStatementsTest.sql b/google-cloud-spanner/src/test/resources/com/google/cloud/spanner/connection/postgresql/ClientSideStatementsTest.sql
index aea0bf4b808..54374f0ad87 100644
--- a/google-cloud-spanner/src/test/resources/com/google/cloud/spanner/connection/postgresql/ClientSideStatementsTest.sql
+++ b/google-cloud-spanner/src/test/resources/com/google/cloud/spanner/connection/postgresql/ClientSideStatementsTest.sql
@@ -49892,6 +49892,2702 @@ set autocommit = false;
@EXPECT EXCEPTION INVALID_ARGUMENT
set spanner.retry_aborts_internally to/-false;
NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+set local spanner.retry_aborts_internally = true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+SET LOCAL SPANNER.RETRY_ABORTS_INTERNALLY = TRUE;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+set local spanner.retry_aborts_internally = true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+ set local spanner.retry_aborts_internally = true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+ set local spanner.retry_aborts_internally = true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+
+
+
+set local spanner.retry_aborts_internally = true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+set local spanner.retry_aborts_internally = true ;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+set local spanner.retry_aborts_internally = true ;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+set local spanner.retry_aborts_internally = true
+
+;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+set local spanner.retry_aborts_internally = true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+set local spanner.retry_aborts_internally = true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+set
+local
+spanner.retry_aborts_internally
+=
+true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+foo set local spanner.retry_aborts_internally = true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally = true bar;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+%set local spanner.retry_aborts_internally = true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally = true%;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally =%true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+_set local spanner.retry_aborts_internally = true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally = true_;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally =_true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+&set local spanner.retry_aborts_internally = true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally = true&;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally =&true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+$set local spanner.retry_aborts_internally = true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally = true$;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally =$true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+@set local spanner.retry_aborts_internally = true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally = true@;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally =@true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+!set local spanner.retry_aborts_internally = true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally = true!;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally =!true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+*set local spanner.retry_aborts_internally = true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally = true*;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally =*true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+(set local spanner.retry_aborts_internally = true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally = true(;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally =(true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+)set local spanner.retry_aborts_internally = true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally = true);
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally =)true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+-set local spanner.retry_aborts_internally = true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally = true-;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally =-true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
++set local spanner.retry_aborts_internally = true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally = true+;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally =+true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+-#set local spanner.retry_aborts_internally = true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally = true-#;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally =-#true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+/set local spanner.retry_aborts_internally = true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally = true/;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally =/true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+\set local spanner.retry_aborts_internally = true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally = true\;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally =\true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+?set local spanner.retry_aborts_internally = true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally = true?;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally =?true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+-/set local spanner.retry_aborts_internally = true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally = true-/;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally =-/true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+/#set local spanner.retry_aborts_internally = true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally = true/#;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally =/#true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+/-set local spanner.retry_aborts_internally = true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally = true/-;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally =/-true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+set local spanner.retry_aborts_internally = false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+SET LOCAL SPANNER.RETRY_ABORTS_INTERNALLY = FALSE;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+set local spanner.retry_aborts_internally = false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+ set local spanner.retry_aborts_internally = false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+ set local spanner.retry_aborts_internally = false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+
+
+
+set local spanner.retry_aborts_internally = false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+set local spanner.retry_aborts_internally = false ;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+set local spanner.retry_aborts_internally = false ;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+set local spanner.retry_aborts_internally = false
+
+;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+set local spanner.retry_aborts_internally = false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+set local spanner.retry_aborts_internally = false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+set
+local
+spanner.retry_aborts_internally
+=
+false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+foo set local spanner.retry_aborts_internally = false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally = false bar;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+%set local spanner.retry_aborts_internally = false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally = false%;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally =%false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+_set local spanner.retry_aborts_internally = false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally = false_;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally =_false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+&set local spanner.retry_aborts_internally = false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally = false&;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally =&false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+$set local spanner.retry_aborts_internally = false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally = false$;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally =$false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+@set local spanner.retry_aborts_internally = false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally = false@;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally =@false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+!set local spanner.retry_aborts_internally = false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally = false!;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally =!false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+*set local spanner.retry_aborts_internally = false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally = false*;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally =*false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+(set local spanner.retry_aborts_internally = false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally = false(;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally =(false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+)set local spanner.retry_aborts_internally = false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally = false);
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally =)false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+-set local spanner.retry_aborts_internally = false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally = false-;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally =-false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
++set local spanner.retry_aborts_internally = false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally = false+;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally =+false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+-#set local spanner.retry_aborts_internally = false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally = false-#;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally =-#false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+/set local spanner.retry_aborts_internally = false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally = false/;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally =/false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+\set local spanner.retry_aborts_internally = false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally = false\;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally =\false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+?set local spanner.retry_aborts_internally = false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally = false?;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally =?false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+-/set local spanner.retry_aborts_internally = false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally = false-/;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally =-/false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+/#set local spanner.retry_aborts_internally = false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally = false/#;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally =/#false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+/-set local spanner.retry_aborts_internally = false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally = false/-;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally =/-false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+set local spanner.retry_aborts_internally to true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+SET LOCAL SPANNER.RETRY_ABORTS_INTERNALLY TO TRUE;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+set local spanner.retry_aborts_internally to true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+ set local spanner.retry_aborts_internally to true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+ set local spanner.retry_aborts_internally to true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+
+
+
+set local spanner.retry_aborts_internally to true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+set local spanner.retry_aborts_internally to true ;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+set local spanner.retry_aborts_internally to true ;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+set local spanner.retry_aborts_internally to true
+
+;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+set local spanner.retry_aborts_internally to true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+set local spanner.retry_aborts_internally to true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+set
+local
+spanner.retry_aborts_internally
+to
+true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+foo set local spanner.retry_aborts_internally to true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally to true bar;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+%set local spanner.retry_aborts_internally to true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally to true%;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally to%true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+_set local spanner.retry_aborts_internally to true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally to true_;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally to_true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+&set local spanner.retry_aborts_internally to true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally to true&;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally to&true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+$set local spanner.retry_aborts_internally to true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally to true$;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally to$true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+@set local spanner.retry_aborts_internally to true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally to true@;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally to@true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+!set local spanner.retry_aborts_internally to true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally to true!;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally to!true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+*set local spanner.retry_aborts_internally to true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally to true*;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally to*true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+(set local spanner.retry_aborts_internally to true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally to true(;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally to(true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+)set local spanner.retry_aborts_internally to true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally to true);
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally to)true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+-set local spanner.retry_aborts_internally to true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally to true-;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally to-true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
++set local spanner.retry_aborts_internally to true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally to true+;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally to+true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+-#set local spanner.retry_aborts_internally to true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally to true-#;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally to-#true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+/set local spanner.retry_aborts_internally to true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally to true/;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally to/true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+\set local spanner.retry_aborts_internally to true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally to true\;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally to\true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+?set local spanner.retry_aborts_internally to true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally to true?;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally to?true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+-/set local spanner.retry_aborts_internally to true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally to true-/;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally to-/true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+/#set local spanner.retry_aborts_internally to true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally to true/#;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally to/#true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+/-set local spanner.retry_aborts_internally to true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally to true/-;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally to/-true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+set local spanner.retry_aborts_internally to false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+SET LOCAL SPANNER.RETRY_ABORTS_INTERNALLY TO FALSE;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+set local spanner.retry_aborts_internally to false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+ set local spanner.retry_aborts_internally to false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+ set local spanner.retry_aborts_internally to false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+
+
+
+set local spanner.retry_aborts_internally to false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+set local spanner.retry_aborts_internally to false ;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+set local spanner.retry_aborts_internally to false ;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+set local spanner.retry_aborts_internally to false
+
+;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+set local spanner.retry_aborts_internally to false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+set local spanner.retry_aborts_internally to false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+set
+local
+spanner.retry_aborts_internally
+to
+false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+foo set local spanner.retry_aborts_internally to false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally to false bar;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+%set local spanner.retry_aborts_internally to false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally to false%;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally to%false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+_set local spanner.retry_aborts_internally to false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally to false_;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally to_false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+&set local spanner.retry_aborts_internally to false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally to false&;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally to&false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+$set local spanner.retry_aborts_internally to false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally to false$;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally to$false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+@set local spanner.retry_aborts_internally to false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally to false@;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally to@false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+!set local spanner.retry_aborts_internally to false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally to false!;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally to!false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+*set local spanner.retry_aborts_internally to false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally to false*;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally to*false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+(set local spanner.retry_aborts_internally to false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally to false(;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally to(false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+)set local spanner.retry_aborts_internally to false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally to false);
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally to)false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+-set local spanner.retry_aborts_internally to false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally to false-;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally to-false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
++set local spanner.retry_aborts_internally to false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally to false+;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally to+false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+-#set local spanner.retry_aborts_internally to false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally to false-#;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally to-#false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+/set local spanner.retry_aborts_internally to false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally to false/;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally to/false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+\set local spanner.retry_aborts_internally to false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally to false\;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally to\false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+?set local spanner.retry_aborts_internally to false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally to false?;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally to?false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+-/set local spanner.retry_aborts_internally to false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally to false-/;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally to-/false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+/#set local spanner.retry_aborts_internally to false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally to false/#;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally to/#false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+/-set local spanner.retry_aborts_internally to false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally to false/-;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set local spanner.retry_aborts_internally to/-false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+set session spanner.retry_aborts_internally = true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+SET SESSION SPANNER.RETRY_ABORTS_INTERNALLY = TRUE;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+set session spanner.retry_aborts_internally = true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+ set session spanner.retry_aborts_internally = true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+ set session spanner.retry_aborts_internally = true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+
+
+
+set session spanner.retry_aborts_internally = true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+set session spanner.retry_aborts_internally = true ;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+set session spanner.retry_aborts_internally = true ;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+set session spanner.retry_aborts_internally = true
+
+;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+set session spanner.retry_aborts_internally = true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+set session spanner.retry_aborts_internally = true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+set
+session
+spanner.retry_aborts_internally
+=
+true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+foo set session spanner.retry_aborts_internally = true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally = true bar;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+%set session spanner.retry_aborts_internally = true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally = true%;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally =%true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+_set session spanner.retry_aborts_internally = true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally = true_;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally =_true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+&set session spanner.retry_aborts_internally = true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally = true&;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally =&true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+$set session spanner.retry_aborts_internally = true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally = true$;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally =$true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+@set session spanner.retry_aborts_internally = true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally = true@;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally =@true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+!set session spanner.retry_aborts_internally = true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally = true!;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally =!true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+*set session spanner.retry_aborts_internally = true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally = true*;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally =*true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+(set session spanner.retry_aborts_internally = true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally = true(;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally =(true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+)set session spanner.retry_aborts_internally = true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally = true);
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally =)true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+-set session spanner.retry_aborts_internally = true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally = true-;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally =-true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
++set session spanner.retry_aborts_internally = true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally = true+;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally =+true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+-#set session spanner.retry_aborts_internally = true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally = true-#;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally =-#true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+/set session spanner.retry_aborts_internally = true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally = true/;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally =/true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+\set session spanner.retry_aborts_internally = true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally = true\;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally =\true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+?set session spanner.retry_aborts_internally = true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally = true?;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally =?true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+-/set session spanner.retry_aborts_internally = true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally = true-/;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally =-/true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+/#set session spanner.retry_aborts_internally = true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally = true/#;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally =/#true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+/-set session spanner.retry_aborts_internally = true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally = true/-;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally =/-true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+set session spanner.retry_aborts_internally = false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+SET SESSION SPANNER.RETRY_ABORTS_INTERNALLY = FALSE;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+set session spanner.retry_aborts_internally = false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+ set session spanner.retry_aborts_internally = false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+ set session spanner.retry_aborts_internally = false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+
+
+
+set session spanner.retry_aborts_internally = false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+set session spanner.retry_aborts_internally = false ;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+set session spanner.retry_aborts_internally = false ;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+set session spanner.retry_aborts_internally = false
+
+;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+set session spanner.retry_aborts_internally = false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+set session spanner.retry_aborts_internally = false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+set
+session
+spanner.retry_aborts_internally
+=
+false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+foo set session spanner.retry_aborts_internally = false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally = false bar;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+%set session spanner.retry_aborts_internally = false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally = false%;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally =%false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+_set session spanner.retry_aborts_internally = false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally = false_;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally =_false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+&set session spanner.retry_aborts_internally = false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally = false&;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally =&false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+$set session spanner.retry_aborts_internally = false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally = false$;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally =$false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+@set session spanner.retry_aborts_internally = false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally = false@;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally =@false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+!set session spanner.retry_aborts_internally = false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally = false!;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally =!false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+*set session spanner.retry_aborts_internally = false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally = false*;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally =*false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+(set session spanner.retry_aborts_internally = false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally = false(;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally =(false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+)set session spanner.retry_aborts_internally = false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally = false);
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally =)false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+-set session spanner.retry_aborts_internally = false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally = false-;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally =-false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
++set session spanner.retry_aborts_internally = false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally = false+;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally =+false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+-#set session spanner.retry_aborts_internally = false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally = false-#;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally =-#false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+/set session spanner.retry_aborts_internally = false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally = false/;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally =/false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+\set session spanner.retry_aborts_internally = false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally = false\;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally =\false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+?set session spanner.retry_aborts_internally = false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally = false?;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally =?false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+-/set session spanner.retry_aborts_internally = false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally = false-/;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally =-/false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+/#set session spanner.retry_aborts_internally = false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally = false/#;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally =/#false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+/-set session spanner.retry_aborts_internally = false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally = false/-;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally =/-false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+set session spanner.retry_aborts_internally to true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+SET SESSION SPANNER.RETRY_ABORTS_INTERNALLY TO TRUE;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+set session spanner.retry_aborts_internally to true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+ set session spanner.retry_aborts_internally to true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+ set session spanner.retry_aborts_internally to true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+
+
+
+set session spanner.retry_aborts_internally to true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+set session spanner.retry_aborts_internally to true ;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+set session spanner.retry_aborts_internally to true ;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+set session spanner.retry_aborts_internally to true
+
+;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+set session spanner.retry_aborts_internally to true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+set session spanner.retry_aborts_internally to true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+set
+session
+spanner.retry_aborts_internally
+to
+true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+foo set session spanner.retry_aborts_internally to true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally to true bar;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+%set session spanner.retry_aborts_internally to true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally to true%;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally to%true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+_set session spanner.retry_aborts_internally to true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally to true_;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally to_true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+&set session spanner.retry_aborts_internally to true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally to true&;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally to&true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+$set session spanner.retry_aborts_internally to true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally to true$;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally to$true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+@set session spanner.retry_aborts_internally to true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally to true@;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally to@true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+!set session spanner.retry_aborts_internally to true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally to true!;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally to!true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+*set session spanner.retry_aborts_internally to true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally to true*;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally to*true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+(set session spanner.retry_aborts_internally to true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally to true(;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally to(true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+)set session spanner.retry_aborts_internally to true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally to true);
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally to)true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+-set session spanner.retry_aborts_internally to true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally to true-;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally to-true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
++set session spanner.retry_aborts_internally to true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally to true+;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally to+true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+-#set session spanner.retry_aborts_internally to true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally to true-#;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally to-#true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+/set session spanner.retry_aborts_internally to true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally to true/;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally to/true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+\set session spanner.retry_aborts_internally to true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally to true\;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally to\true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+?set session spanner.retry_aborts_internally to true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally to true?;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally to?true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+-/set session spanner.retry_aborts_internally to true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally to true-/;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally to-/true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+/#set session spanner.retry_aborts_internally to true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally to true/#;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally to/#true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+/-set session spanner.retry_aborts_internally to true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally to true/-;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally to/-true;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+set session spanner.retry_aborts_internally to false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+SET SESSION SPANNER.RETRY_ABORTS_INTERNALLY TO FALSE;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+set session spanner.retry_aborts_internally to false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+ set session spanner.retry_aborts_internally to false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+ set session spanner.retry_aborts_internally to false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+
+
+
+set session spanner.retry_aborts_internally to false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+set session spanner.retry_aborts_internally to false ;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+set session spanner.retry_aborts_internally to false ;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+set session spanner.retry_aborts_internally to false
+
+;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+set session spanner.retry_aborts_internally to false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+set session spanner.retry_aborts_internally to false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+set
+session
+spanner.retry_aborts_internally
+to
+false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+foo set session spanner.retry_aborts_internally to false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally to false bar;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+%set session spanner.retry_aborts_internally to false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally to false%;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally to%false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+_set session spanner.retry_aborts_internally to false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally to false_;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally to_false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+&set session spanner.retry_aborts_internally to false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally to false&;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally to&false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+$set session spanner.retry_aborts_internally to false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally to false$;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally to$false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+@set session spanner.retry_aborts_internally to false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally to false@;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally to@false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+!set session spanner.retry_aborts_internally to false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally to false!;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally to!false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+*set session spanner.retry_aborts_internally to false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally to false*;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally to*false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+(set session spanner.retry_aborts_internally to false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally to false(;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally to(false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+)set session spanner.retry_aborts_internally to false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally to false);
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally to)false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+-set session spanner.retry_aborts_internally to false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally to false-;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally to-false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
++set session spanner.retry_aborts_internally to false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally to false+;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally to+false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+-#set session spanner.retry_aborts_internally to false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally to false-#;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally to-#false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+/set session spanner.retry_aborts_internally to false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally to false/;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally to/false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+\set session spanner.retry_aborts_internally to false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally to false\;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally to\false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+?set session spanner.retry_aborts_internally to false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally to false?;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally to?false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+-/set session spanner.retry_aborts_internally to false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally to false-/;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally to-/false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+/#set session spanner.retry_aborts_internally to false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally to false/#;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally to/#false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+/-set session spanner.retry_aborts_internally to false;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally to false/-;
+NEW_CONNECTION;
+set spanner.readonly = false;
+set autocommit = false;
+@EXPECT EXCEPTION INVALID_ARGUMENT
+set session spanner.retry_aborts_internally to/-false;
+NEW_CONNECTION;
set spanner.autocommit_dml_mode='PARTITIONED_NON_ATOMIC';
NEW_CONNECTION;
SET SPANNER.AUTOCOMMIT_DML_MODE='PARTITIONED_NON_ATOMIC';
diff --git a/google-cloud-spanner/src/test/resources/com/google/cloud/spanner/connection/postgresql/ConnectionImplGeneratedSqlScriptTest.sql b/google-cloud-spanner/src/test/resources/com/google/cloud/spanner/connection/postgresql/ConnectionImplGeneratedSqlScriptTest.sql
index 3db3bda388b..f5456bb55ee 100644
--- a/google-cloud-spanner/src/test/resources/com/google/cloud/spanner/connection/postgresql/ConnectionImplGeneratedSqlScriptTest.sql
+++ b/google-cloud-spanner/src/test/resources/com/google/cloud/spanner/connection/postgresql/ConnectionImplGeneratedSqlScriptTest.sql
@@ -160,15 +160,15 @@ NEW_CONNECTION;
SET SPANNER.READONLY=TRUE;
SET AUTOCOMMIT=FALSE;
COMMIT;
-SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:10.130000000Z';
-@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2024-11-25T10:49:10.130000000Z'
+SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:24.347000000Z';
+@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2024-12-07T16:05:24.347000000Z'
SHOW VARIABLE SPANNER.READ_ONLY_STALENESS;
NEW_CONNECTION;
SET SPANNER.READONLY=TRUE;
SET AUTOCOMMIT=FALSE;
COMMIT;
@EXPECT EXCEPTION FAILED_PRECONDITION
-SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:10.130000000Z';
+SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:24.347000000Z';
NEW_CONNECTION;
SET SPANNER.READONLY=TRUE;
SET AUTOCOMMIT=FALSE;
@@ -510,15 +510,15 @@ NEW_CONNECTION;
SET SPANNER.READONLY=TRUE;
SET AUTOCOMMIT=FALSE;
SET SPANNER.READ_ONLY_STALENESS='EXACT_STALENESS 10s';
-SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:10.240000000Z';
-@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2024-11-25T10:49:10.240000000Z'
+SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:24.458000000Z';
+@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2024-12-07T16:05:24.458000000Z'
SHOW VARIABLE SPANNER.READ_ONLY_STALENESS;
NEW_CONNECTION;
SET SPANNER.READONLY=TRUE;
SET AUTOCOMMIT=FALSE;
SET SPANNER.READ_ONLY_STALENESS='EXACT_STALENESS 10s';
@EXPECT EXCEPTION FAILED_PRECONDITION
-SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:10.240000000Z';
+SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:24.458000000Z';
NEW_CONNECTION;
SET SPANNER.READONLY=TRUE;
SET AUTOCOMMIT=FALSE;
@@ -950,8 +950,8 @@ BEGIN TRANSACTION;
@EXPECT RESULT_SET 'TEST',1
SELECT 1 AS TEST;
ROLLBACK;
-SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:10.352000000Z';
-@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2024-11-25T10:49:10.352000000Z'
+SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:24.580000000Z';
+@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2024-12-07T16:05:24.580000000Z'
SHOW VARIABLE SPANNER.READ_ONLY_STALENESS;
NEW_CONNECTION;
SET SPANNER.READONLY=TRUE;
@@ -961,7 +961,7 @@ BEGIN TRANSACTION;
SELECT 1 AS TEST;
ROLLBACK;
@EXPECT EXCEPTION FAILED_PRECONDITION
-SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:10.352000000Z';
+SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:24.580000000Z';
NEW_CONNECTION;
SET SPANNER.READONLY=TRUE;
SET AUTOCOMMIT=FALSE;
@@ -1462,8 +1462,8 @@ BEGIN TRANSACTION;
@EXPECT RESULT_SET 'TEST',1
SELECT 1 AS TEST;
COMMIT;
-SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:10.472000000Z';
-@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2024-11-25T10:49:10.472000000Z'
+SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:24.692000000Z';
+@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2024-12-07T16:05:24.692000000Z'
SHOW VARIABLE SPANNER.READ_ONLY_STALENESS;
NEW_CONNECTION;
SET SPANNER.READONLY=TRUE;
@@ -1473,7 +1473,7 @@ BEGIN TRANSACTION;
SELECT 1 AS TEST;
COMMIT;
@EXPECT EXCEPTION FAILED_PRECONDITION
-SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:10.472000000Z';
+SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:24.692000000Z';
NEW_CONNECTION;
SET SPANNER.READONLY=TRUE;
SET AUTOCOMMIT=FALSE;
@@ -1876,15 +1876,15 @@ NEW_CONNECTION;
SET SPANNER.READONLY=TRUE;
SET AUTOCOMMIT=FALSE;
BEGIN TRANSACTION;
-SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:10.566000000Z';
-@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2024-11-25T10:49:10.566000000Z'
+SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:24.772000000Z';
+@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2024-12-07T16:05:24.772000000Z'
SHOW VARIABLE SPANNER.READ_ONLY_STALENESS;
NEW_CONNECTION;
SET SPANNER.READONLY=TRUE;
SET AUTOCOMMIT=FALSE;
BEGIN TRANSACTION;
@EXPECT EXCEPTION FAILED_PRECONDITION
-SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:10.566000000Z';
+SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:24.772000000Z';
NEW_CONNECTION;
SET SPANNER.READONLY=TRUE;
SET AUTOCOMMIT=FALSE;
@@ -2243,14 +2243,14 @@ SET AUTOCOMMIT=FALSE;
@EXPECT RESULT_SET 'TEST',1
SELECT 1 AS TEST;
@EXPECT EXCEPTION FAILED_PRECONDITION
-SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:10.661000000Z';
+SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:24.857000000Z';
NEW_CONNECTION;
SET SPANNER.READONLY=TRUE;
SET AUTOCOMMIT=FALSE;
@EXPECT RESULT_SET 'TEST',1
SELECT 1 AS TEST;
@EXPECT EXCEPTION FAILED_PRECONDITION
-SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:10.661000000Z';
+SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:24.857000000Z';
NEW_CONNECTION;
SET SPANNER.READONLY=TRUE;
SET AUTOCOMMIT=FALSE;
@@ -2600,13 +2600,13 @@ SET SPANNER.READONLY=TRUE;
SET AUTOCOMMIT=FALSE;
SELECT 1 AS TEST;
@EXPECT EXCEPTION FAILED_PRECONDITION
-SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:10.751000000Z';
+SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:24.942000000Z';
NEW_CONNECTION;
SET SPANNER.READONLY=TRUE;
SET AUTOCOMMIT=FALSE;
SELECT 1 AS TEST;
@EXPECT EXCEPTION FAILED_PRECONDITION
-SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:10.751000000Z';
+SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:24.942000000Z';
NEW_CONNECTION;
SET SPANNER.READONLY=TRUE;
SET AUTOCOMMIT=FALSE;
@@ -2910,14 +2910,14 @@ SHOW VARIABLE SPANNER.READ_ONLY_STALENESS;
NEW_CONNECTION;
SET SPANNER.READONLY=TRUE;
SET AUTOCOMMIT=FALSE;
-SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:10.827000000Z';
-@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2024-11-25T10:49:10.827000000Z'
+SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:25.018000000Z';
+@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2024-12-07T16:05:25.018000000Z'
SHOW VARIABLE SPANNER.READ_ONLY_STALENESS;
NEW_CONNECTION;
SET SPANNER.READONLY=TRUE;
SET AUTOCOMMIT=FALSE;
@EXPECT EXCEPTION FAILED_PRECONDITION
-SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:10.827000000Z';
+SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:25.018000000Z';
NEW_CONNECTION;
SET SPANNER.READONLY=TRUE;
SET AUTOCOMMIT=FALSE;
@@ -3245,15 +3245,15 @@ NEW_CONNECTION;
SET SPANNER.READONLY=FALSE;
SET AUTOCOMMIT=FALSE;
COMMIT;
-SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:10.925000000Z';
-@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2024-11-25T10:49:10.925000000Z'
+SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:25.111000000Z';
+@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2024-12-07T16:05:25.111000000Z'
SHOW VARIABLE SPANNER.READ_ONLY_STALENESS;
NEW_CONNECTION;
SET SPANNER.READONLY=FALSE;
SET AUTOCOMMIT=FALSE;
COMMIT;
@EXPECT EXCEPTION FAILED_PRECONDITION
-SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:10.925000000Z';
+SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:25.111000000Z';
NEW_CONNECTION;
SET SPANNER.READONLY=FALSE;
SET AUTOCOMMIT=FALSE;
@@ -3662,8 +3662,8 @@ SET AUTOCOMMIT=FALSE;
START BATCH DDL;
CREATE TABLE foo (id INT64 NOT NULL, name STRING(100)) PRIMARY KEY (id);
RUN BATCH;
-SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:11.005000000Z';
-@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2024-11-25T10:49:11.005000000Z'
+SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:25.187000000Z';
+@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2024-12-07T16:05:25.187000000Z'
SHOW VARIABLE SPANNER.READ_ONLY_STALENESS;
NEW_CONNECTION;
SET SPANNER.READONLY=FALSE;
@@ -3672,7 +3672,7 @@ START BATCH DDL;
CREATE TABLE foo (id INT64 NOT NULL, name STRING(100)) PRIMARY KEY (id);
RUN BATCH;
@EXPECT EXCEPTION FAILED_PRECONDITION
-SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:11.005000000Z';
+SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:25.187000000Z';
NEW_CONNECTION;
SET SPANNER.READONLY=FALSE;
SET AUTOCOMMIT=FALSE;
@@ -4081,14 +4081,14 @@ SET AUTOCOMMIT=FALSE;
START BATCH DDL;
CREATE TABLE foo (id INT64 NOT NULL, name STRING(100)) PRIMARY KEY (id);
@EXPECT EXCEPTION FAILED_PRECONDITION
-SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:11.078000000Z';
+SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:25.253000000Z';
NEW_CONNECTION;
SET SPANNER.READONLY=FALSE;
SET AUTOCOMMIT=FALSE;
START BATCH DDL;
CREATE TABLE foo (id INT64 NOT NULL, name STRING(100)) PRIMARY KEY (id);
@EXPECT EXCEPTION FAILED_PRECONDITION
-SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:11.078000000Z';
+SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:25.253000000Z';
NEW_CONNECTION;
SET SPANNER.READONLY=FALSE;
SET AUTOCOMMIT=FALSE;
@@ -4438,13 +4438,13 @@ SET SPANNER.READONLY=FALSE;
SET AUTOCOMMIT=FALSE;
START BATCH DDL;
@EXPECT EXCEPTION FAILED_PRECONDITION
-SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:11.144000000Z';
+SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:25.315000000Z';
NEW_CONNECTION;
SET SPANNER.READONLY=FALSE;
SET AUTOCOMMIT=FALSE;
START BATCH DDL;
@EXPECT EXCEPTION FAILED_PRECONDITION
-SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:11.144000000Z';
+SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:25.315000000Z';
NEW_CONNECTION;
SET SPANNER.READONLY=FALSE;
SET AUTOCOMMIT=FALSE;
@@ -4877,8 +4877,8 @@ SET TRANSACTION READ ONLY;
@EXPECT RESULT_SET 'TEST',1
SELECT 1 AS TEST;
COMMIT;
-SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:11.224000000Z';
-@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2024-11-25T10:49:11.224000000Z'
+SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:25.390000000Z';
+@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2024-12-07T16:05:25.390000000Z'
SHOW VARIABLE SPANNER.READ_ONLY_STALENESS;
NEW_CONNECTION;
SET SPANNER.READONLY=FALSE;
@@ -4888,7 +4888,7 @@ SET TRANSACTION READ ONLY;
SELECT 1 AS TEST;
COMMIT;
@EXPECT EXCEPTION FAILED_PRECONDITION
-SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:11.224000000Z';
+SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:25.390000000Z';
NEW_CONNECTION;
SET SPANNER.READONLY=FALSE;
SET AUTOCOMMIT=FALSE;
@@ -5288,15 +5288,15 @@ NEW_CONNECTION;
SET SPANNER.READONLY=FALSE;
SET AUTOCOMMIT=FALSE;
SET TRANSACTION READ ONLY;
-SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:11.296000000Z';
-@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2024-11-25T10:49:11.296000000Z'
+SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:25.454000000Z';
+@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2024-12-07T16:05:25.454000000Z'
SHOW VARIABLE SPANNER.READ_ONLY_STALENESS;
NEW_CONNECTION;
SET SPANNER.READONLY=FALSE;
SET AUTOCOMMIT=FALSE;
SET TRANSACTION READ ONLY;
@EXPECT EXCEPTION FAILED_PRECONDITION
-SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:11.296000000Z';
+SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:25.454000000Z';
NEW_CONNECTION;
SET SPANNER.READONLY=FALSE;
SET AUTOCOMMIT=FALSE;
@@ -5641,15 +5641,15 @@ NEW_CONNECTION;
SET SPANNER.READONLY=FALSE;
SET AUTOCOMMIT=FALSE;
SET SPANNER.READ_ONLY_STALENESS='EXACT_STALENESS 10s';
-SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:11.363000000Z';
-@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2024-11-25T10:49:11.363000000Z'
+SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:25.519000000Z';
+@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2024-12-07T16:05:25.519000000Z'
SHOW VARIABLE SPANNER.READ_ONLY_STALENESS;
NEW_CONNECTION;
SET SPANNER.READONLY=FALSE;
SET AUTOCOMMIT=FALSE;
SET SPANNER.READ_ONLY_STALENESS='EXACT_STALENESS 10s';
@EXPECT EXCEPTION FAILED_PRECONDITION
-SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:11.363000000Z';
+SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:25.519000000Z';
NEW_CONNECTION;
SET SPANNER.READONLY=FALSE;
SET AUTOCOMMIT=FALSE;
@@ -6088,8 +6088,8 @@ BEGIN TRANSACTION;
@EXPECT RESULT_SET 'TEST',1
SELECT 1 AS TEST;
ROLLBACK;
-SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:11.444000000Z';
-@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2024-11-25T10:49:11.444000000Z'
+SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:25.597000000Z';
+@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2024-12-07T16:05:25.597000000Z'
SHOW VARIABLE SPANNER.READ_ONLY_STALENESS;
NEW_CONNECTION;
SET SPANNER.READONLY=FALSE;
@@ -6099,7 +6099,7 @@ BEGIN TRANSACTION;
SELECT 1 AS TEST;
ROLLBACK;
@EXPECT EXCEPTION FAILED_PRECONDITION
-SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:11.444000000Z';
+SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:25.597000000Z';
NEW_CONNECTION;
SET SPANNER.READONLY=FALSE;
SET AUTOCOMMIT=FALSE;
@@ -6607,8 +6607,8 @@ BEGIN TRANSACTION;
@EXPECT RESULT_SET 'TEST',1
SELECT 1 AS TEST;
COMMIT;
-SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:11.539000000Z';
-@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2024-11-25T10:49:11.539000000Z'
+SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:25.689000000Z';
+@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2024-12-07T16:05:25.689000000Z'
SHOW VARIABLE SPANNER.READ_ONLY_STALENESS;
NEW_CONNECTION;
SET SPANNER.READONLY=FALSE;
@@ -6618,7 +6618,7 @@ BEGIN TRANSACTION;
SELECT 1 AS TEST;
COMMIT;
@EXPECT EXCEPTION FAILED_PRECONDITION
-SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:11.539000000Z';
+SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:25.689000000Z';
NEW_CONNECTION;
SET SPANNER.READONLY=FALSE;
SET AUTOCOMMIT=FALSE;
@@ -7023,15 +7023,15 @@ NEW_CONNECTION;
SET SPANNER.READONLY=FALSE;
SET AUTOCOMMIT=FALSE;
BEGIN TRANSACTION;
-SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:11.614000000Z';
-@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2024-11-25T10:49:11.614000000Z'
+SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:25.755000000Z';
+@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2024-12-07T16:05:25.755000000Z'
SHOW VARIABLE SPANNER.READ_ONLY_STALENESS;
NEW_CONNECTION;
SET SPANNER.READONLY=FALSE;
SET AUTOCOMMIT=FALSE;
BEGIN TRANSACTION;
@EXPECT EXCEPTION FAILED_PRECONDITION
-SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:11.614000000Z';
+SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:25.755000000Z';
NEW_CONNECTION;
SET SPANNER.READONLY=FALSE;
SET AUTOCOMMIT=FALSE;
@@ -7394,14 +7394,14 @@ SET AUTOCOMMIT=FALSE;
@EXPECT RESULT_SET 'TEST',1
SELECT 1 AS TEST;
@EXPECT EXCEPTION FAILED_PRECONDITION
-SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:11.693000000Z';
+SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:25.829000000Z';
NEW_CONNECTION;
SET SPANNER.READONLY=FALSE;
SET AUTOCOMMIT=FALSE;
@EXPECT RESULT_SET 'TEST',1
SELECT 1 AS TEST;
@EXPECT EXCEPTION FAILED_PRECONDITION
-SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:11.693000000Z';
+SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:25.829000000Z';
NEW_CONNECTION;
SET SPANNER.READONLY=FALSE;
SET AUTOCOMMIT=FALSE;
@@ -7756,13 +7756,13 @@ SET SPANNER.READONLY=FALSE;
SET AUTOCOMMIT=FALSE;
SELECT 1 AS TEST;
@EXPECT EXCEPTION FAILED_PRECONDITION
-SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:11.771000000Z';
+SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:25.906000000Z';
NEW_CONNECTION;
SET SPANNER.READONLY=FALSE;
SET AUTOCOMMIT=FALSE;
SELECT 1 AS TEST;
@EXPECT EXCEPTION FAILED_PRECONDITION
-SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:11.771000000Z';
+SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:25.906000000Z';
NEW_CONNECTION;
SET SPANNER.READONLY=FALSE;
SET AUTOCOMMIT=FALSE;
@@ -8075,14 +8075,14 @@ SHOW VARIABLE SPANNER.READ_ONLY_STALENESS;
NEW_CONNECTION;
SET SPANNER.READONLY=FALSE;
SET AUTOCOMMIT=FALSE;
-SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:11.836000000Z';
-@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2024-11-25T10:49:11.836000000Z'
+SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:25.970000000Z';
+@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2024-12-07T16:05:25.970000000Z'
SHOW VARIABLE SPANNER.READ_ONLY_STALENESS;
NEW_CONNECTION;
SET SPANNER.READONLY=FALSE;
SET AUTOCOMMIT=FALSE;
@EXPECT EXCEPTION FAILED_PRECONDITION
-SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:11.836000000Z';
+SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:25.970000000Z';
NEW_CONNECTION;
SET SPANNER.READONLY=FALSE;
SET AUTOCOMMIT=FALSE;
@@ -8392,13 +8392,13 @@ SET SPANNER.READONLY=FALSE;
SET AUTOCOMMIT=TRUE;
START BATCH DDL;
@EXPECT EXCEPTION FAILED_PRECONDITION
-SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:11.894000000Z';
+SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:26.028000000Z';
NEW_CONNECTION;
SET SPANNER.READONLY=FALSE;
SET AUTOCOMMIT=TRUE;
START BATCH DDL;
@EXPECT EXCEPTION FAILED_PRECONDITION
-SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:11.894000000Z';
+SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:26.028000000Z';
NEW_CONNECTION;
SET SPANNER.READONLY=FALSE;
SET AUTOCOMMIT=TRUE;
@@ -8753,8 +8753,8 @@ SET SPANNER.READONLY=FALSE;
SET AUTOCOMMIT=TRUE;
BEGIN TRANSACTION;
SET TRANSACTION READ ONLY;
-SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:11.953000000Z';
-@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2024-11-25T10:49:11.953000000Z'
+SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:26.091000000Z';
+@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2024-12-07T16:05:26.091000000Z'
SHOW VARIABLE SPANNER.READ_ONLY_STALENESS;
NEW_CONNECTION;
SET SPANNER.READONLY=FALSE;
@@ -8762,7 +8762,7 @@ SET AUTOCOMMIT=TRUE;
BEGIN TRANSACTION;
SET TRANSACTION READ ONLY;
@EXPECT EXCEPTION FAILED_PRECONDITION
-SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:11.953000000Z';
+SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:26.091000000Z';
NEW_CONNECTION;
SET SPANNER.READONLY=FALSE;
SET AUTOCOMMIT=TRUE;
@@ -9200,8 +9200,8 @@ SET AUTOCOMMIT=TRUE;
BEGIN TRANSACTION;
UPDATE foo SET bar=1;
COMMIT;
-SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:12.028000000Z';
-@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2024-11-25T10:49:12.028000000Z'
+SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:26.165000000Z';
+@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2024-12-07T16:05:26.165000000Z'
SHOW VARIABLE SPANNER.READ_ONLY_STALENESS;
NEW_CONNECTION;
SET SPANNER.READONLY=FALSE;
@@ -9209,8 +9209,8 @@ SET AUTOCOMMIT=TRUE;
BEGIN TRANSACTION;
UPDATE foo SET bar=1;
COMMIT;
-SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:12.028000000Z';
-@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2024-11-25T10:49:12.028000000Z'
+SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:26.165000000Z';
+@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2024-12-07T16:05:26.165000000Z'
SHOW VARIABLE SPANNER.READ_ONLY_STALENESS;
NEW_CONNECTION;
SET SPANNER.READONLY=FALSE;
@@ -9596,15 +9596,15 @@ NEW_CONNECTION;
SET SPANNER.READONLY=FALSE;
SET AUTOCOMMIT=TRUE;
BEGIN TRANSACTION;
-SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:12.093000000Z';
-@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2024-11-25T10:49:12.093000000Z'
+SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:26.228000000Z';
+@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2024-12-07T16:05:26.228000000Z'
SHOW VARIABLE SPANNER.READ_ONLY_STALENESS;
NEW_CONNECTION;
SET SPANNER.READONLY=FALSE;
SET AUTOCOMMIT=TRUE;
BEGIN TRANSACTION;
@EXPECT EXCEPTION FAILED_PRECONDITION
-SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:12.093000000Z';
+SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:26.228000000Z';
NEW_CONNECTION;
SET SPANNER.READONLY=FALSE;
SET AUTOCOMMIT=TRUE;
@@ -9958,15 +9958,15 @@ NEW_CONNECTION;
SET SPANNER.READONLY=FALSE;
SET AUTOCOMMIT=TRUE;
CREATE TABLE foo (id INT64 NOT NULL, name STRING(100)) PRIMARY KEY (id);
-SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:12.159000000Z';
-@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2024-11-25T10:49:12.159000000Z'
+SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:26.292000000Z';
+@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2024-12-07T16:05:26.292000000Z'
SHOW VARIABLE SPANNER.READ_ONLY_STALENESS;
NEW_CONNECTION;
SET SPANNER.READONLY=FALSE;
SET AUTOCOMMIT=TRUE;
CREATE TABLE foo (id INT64 NOT NULL, name STRING(100)) PRIMARY KEY (id);
-SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:12.159000000Z';
-@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2024-11-25T10:49:12.159000000Z'
+SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:26.292000000Z';
+@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2024-12-07T16:05:26.292000000Z'
SHOW VARIABLE SPANNER.READ_ONLY_STALENESS;
NEW_CONNECTION;
SET SPANNER.READONLY=FALSE;
@@ -10329,15 +10329,15 @@ NEW_CONNECTION;
SET SPANNER.READONLY=FALSE;
SET AUTOCOMMIT=TRUE;
UPDATE foo SET bar=1;
-SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:12.227000000Z';
-@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2024-11-25T10:49:12.227000000Z'
+SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:26.357000000Z';
+@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2024-12-07T16:05:26.357000000Z'
SHOW VARIABLE SPANNER.READ_ONLY_STALENESS;
NEW_CONNECTION;
SET SPANNER.READONLY=FALSE;
SET AUTOCOMMIT=TRUE;
UPDATE foo SET bar=1;
-SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:12.227000000Z';
-@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2024-11-25T10:49:12.227000000Z'
+SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:26.357000000Z';
+@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2024-12-07T16:05:26.357000000Z'
SHOW VARIABLE SPANNER.READ_ONLY_STALENESS;
NEW_CONNECTION;
SET SPANNER.READONLY=FALSE;
@@ -10730,16 +10730,16 @@ SET SPANNER.READONLY=FALSE;
SET AUTOCOMMIT=TRUE;
@EXPECT RESULT_SET 'TEST',1
SELECT 1 AS TEST;
-SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:12.296000000Z';
-@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2024-11-25T10:49:12.296000000Z'
+SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:26.423000000Z';
+@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2024-12-07T16:05:26.423000000Z'
SHOW VARIABLE SPANNER.READ_ONLY_STALENESS;
NEW_CONNECTION;
SET SPANNER.READONLY=FALSE;
SET AUTOCOMMIT=TRUE;
@EXPECT RESULT_SET 'TEST',1
SELECT 1 AS TEST;
-SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:12.296000000Z';
-@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2024-11-25T10:49:12.296000000Z'
+SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:26.423000000Z';
+@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2024-12-07T16:05:26.423000000Z'
SHOW VARIABLE SPANNER.READ_ONLY_STALENESS;
NEW_CONNECTION;
SET SPANNER.READONLY=FALSE;
@@ -11125,15 +11125,15 @@ NEW_CONNECTION;
SET SPANNER.READONLY=FALSE;
SET AUTOCOMMIT=TRUE;
SELECT 1 AS TEST;
-SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:12.365000000Z';
-@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2024-11-25T10:49:12.365000000Z'
+SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:26.492000000Z';
+@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2024-12-07T16:05:26.492000000Z'
SHOW VARIABLE SPANNER.READ_ONLY_STALENESS;
NEW_CONNECTION;
SET SPANNER.READONLY=FALSE;
SET AUTOCOMMIT=TRUE;
SELECT 1 AS TEST;
-SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:12.365000000Z';
-@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2024-11-25T10:49:12.365000000Z'
+SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:26.492000000Z';
+@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2024-12-07T16:05:26.492000000Z'
SHOW VARIABLE SPANNER.READ_ONLY_STALENESS;
NEW_CONNECTION;
SET SPANNER.READONLY=FALSE;
@@ -11466,14 +11466,14 @@ SHOW VARIABLE SPANNER.READ_ONLY_STALENESS;
NEW_CONNECTION;
SET SPANNER.READONLY=FALSE;
SET AUTOCOMMIT=TRUE;
-SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:12.427000000Z';
-@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2024-11-25T10:49:12.427000000Z'
+SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:26.567000000Z';
+@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2024-12-07T16:05:26.567000000Z'
SHOW VARIABLE SPANNER.READ_ONLY_STALENESS;
NEW_CONNECTION;
SET SPANNER.READONLY=FALSE;
SET AUTOCOMMIT=TRUE;
-SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:12.427000000Z';
-@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2024-11-25T10:49:12.427000000Z'
+SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:26.567000000Z';
+@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2024-12-07T16:05:26.567000000Z'
SHOW VARIABLE SPANNER.READ_ONLY_STALENESS;
NEW_CONNECTION;
SET SPANNER.READONLY=FALSE;
@@ -11796,15 +11796,15 @@ NEW_CONNECTION;
SET SPANNER.READONLY=TRUE;
SET AUTOCOMMIT=TRUE;
SET SPANNER.READ_ONLY_STALENESS='MAX_STALENESS 10s';
-SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:12.485000000Z';
-@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2024-11-25T10:49:12.485000000Z'
+SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:26.626000000Z';
+@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2024-12-07T16:05:26.626000000Z'
SHOW VARIABLE SPANNER.READ_ONLY_STALENESS;
NEW_CONNECTION;
SET SPANNER.READONLY=TRUE;
SET AUTOCOMMIT=TRUE;
SET SPANNER.READ_ONLY_STALENESS='MAX_STALENESS 10s';
-SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:12.485000000Z';
-@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2024-11-25T10:49:12.485000000Z'
+SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:26.626000000Z';
+@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2024-12-07T16:05:26.626000000Z'
SHOW VARIABLE SPANNER.READ_ONLY_STALENESS;
NEW_CONNECTION;
SET SPANNER.READONLY=TRUE;
@@ -12211,8 +12211,8 @@ SET AUTOCOMMIT=TRUE;
BEGIN TRANSACTION;
SELECT 1 AS TEST;
COMMIT;
-SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:12.555000000Z';
-@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2024-11-25T10:49:12.555000000Z'
+SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:26.692000000Z';
+@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2024-12-07T16:05:26.692000000Z'
SHOW VARIABLE SPANNER.READ_ONLY_STALENESS;
NEW_CONNECTION;
SET SPANNER.READONLY=TRUE;
@@ -12220,8 +12220,8 @@ SET AUTOCOMMIT=TRUE;
BEGIN TRANSACTION;
SELECT 1 AS TEST;
COMMIT;
-SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:12.555000000Z';
-@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2024-11-25T10:49:12.555000000Z'
+SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:26.692000000Z';
+@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2024-12-07T16:05:26.692000000Z'
SHOW VARIABLE SPANNER.READ_ONLY_STALENESS;
NEW_CONNECTION;
SET SPANNER.READONLY=TRUE;
@@ -12604,15 +12604,15 @@ NEW_CONNECTION;
SET SPANNER.READONLY=TRUE;
SET AUTOCOMMIT=TRUE;
BEGIN TRANSACTION;
-SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:12.615000000Z';
-@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2024-11-25T10:49:12.615000000Z'
+SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:26.751000000Z';
+@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2024-12-07T16:05:26.751000000Z'
SHOW VARIABLE SPANNER.READ_ONLY_STALENESS;
NEW_CONNECTION;
SET SPANNER.READONLY=TRUE;
SET AUTOCOMMIT=TRUE;
BEGIN TRANSACTION;
@EXPECT EXCEPTION FAILED_PRECONDITION
-SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:12.615000000Z';
+SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:26.751000000Z';
NEW_CONNECTION;
SET SPANNER.READONLY=TRUE;
SET AUTOCOMMIT=TRUE;
@@ -12950,15 +12950,15 @@ NEW_CONNECTION;
SET SPANNER.READONLY=TRUE;
SET AUTOCOMMIT=TRUE;
SELECT 1 AS TEST;
-SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:12.682000000Z';
-@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2024-11-25T10:49:12.682000000Z'
+SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:26.812000000Z';
+@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2024-12-07T16:05:26.812000000Z'
SHOW VARIABLE SPANNER.READ_ONLY_STALENESS;
NEW_CONNECTION;
SET SPANNER.READONLY=TRUE;
SET AUTOCOMMIT=TRUE;
SELECT 1 AS TEST;
-SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:12.682000000Z';
-@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2024-11-25T10:49:12.682000000Z'
+SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:26.812000000Z';
+@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2024-12-07T16:05:26.812000000Z'
SHOW VARIABLE SPANNER.READ_ONLY_STALENESS;
NEW_CONNECTION;
SET SPANNER.READONLY=TRUE;
@@ -13305,15 +13305,15 @@ NEW_CONNECTION;
SET SPANNER.READONLY=TRUE;
SET AUTOCOMMIT=TRUE;
SELECT 1 AS TEST;
-SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:12.747000000Z';
-@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2024-11-25T10:49:12.747000000Z'
+SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:26.875000000Z';
+@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2024-12-07T16:05:26.875000000Z'
SHOW VARIABLE SPANNER.READ_ONLY_STALENESS;
NEW_CONNECTION;
SET SPANNER.READONLY=TRUE;
SET AUTOCOMMIT=TRUE;
SELECT 1 AS TEST;
-SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:12.747000000Z';
-@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2024-11-25T10:49:12.747000000Z'
+SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:26.875000000Z';
+@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2024-12-07T16:05:26.875000000Z'
SHOW VARIABLE SPANNER.READ_ONLY_STALENESS;
NEW_CONNECTION;
SET SPANNER.READONLY=TRUE;
@@ -13630,14 +13630,14 @@ SHOW VARIABLE SPANNER.READ_ONLY_STALENESS;
NEW_CONNECTION;
SET SPANNER.READONLY=TRUE;
SET AUTOCOMMIT=TRUE;
-SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-11-25T10:49:12.807000000Z';
-@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2024-11-25T10:49:12.807000000Z'
+SET SPANNER.READ_ONLY_STALENESS='READ_TIMESTAMP 2024-12-07T16:05:26.931000000Z';
+@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','READ_TIMESTAMP 2024-12-07T16:05:26.931000000Z'
SHOW VARIABLE SPANNER.READ_ONLY_STALENESS;
NEW_CONNECTION;
SET SPANNER.READONLY=TRUE;
SET AUTOCOMMIT=TRUE;
-SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-11-25T10:49:12.807000000Z';
-@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2024-11-25T10:49:12.807000000Z'
+SET SPANNER.READ_ONLY_STALENESS='MIN_READ_TIMESTAMP 2024-12-07T16:05:26.931000000Z';
+@EXPECT RESULT_SET 'SPANNER.READ_ONLY_STALENESS','MIN_READ_TIMESTAMP 2024-12-07T16:05:26.931000000Z'
SHOW VARIABLE SPANNER.READ_ONLY_STALENESS;
NEW_CONNECTION;
SET SPANNER.READONLY=TRUE;
diff --git a/grpc-google-cloud-spanner-admin-database-v1/pom.xml b/grpc-google-cloud-spanner-admin-database-v1/pom.xml
index 000a88b6261..2ec9ebce7b9 100644
--- a/grpc-google-cloud-spanner-admin-database-v1/pom.xml
+++ b/grpc-google-cloud-spanner-admin-database-v1/pom.xml
@@ -4,13 +4,13 @@
4.0.0
com.google.api.grpc
grpc-google-cloud-spanner-admin-database-v1
- 6.82.0
+ 6.83.1-SNAPSHOT
grpc-google-cloud-spanner-admin-database-v1
GRPC library for grpc-google-cloud-spanner-admin-database-v1
com.google.cloud
google-cloud-spanner-parent
- 6.82.0
+ 6.83.1-SNAPSHOT
diff --git a/grpc-google-cloud-spanner-admin-instance-v1/pom.xml b/grpc-google-cloud-spanner-admin-instance-v1/pom.xml
index b794aca19dd..78a64b26cb1 100644
--- a/grpc-google-cloud-spanner-admin-instance-v1/pom.xml
+++ b/grpc-google-cloud-spanner-admin-instance-v1/pom.xml
@@ -4,13 +4,13 @@
4.0.0
com.google.api.grpc
grpc-google-cloud-spanner-admin-instance-v1
- 6.82.0
+ 6.83.1-SNAPSHOT
grpc-google-cloud-spanner-admin-instance-v1
GRPC library for grpc-google-cloud-spanner-admin-instance-v1
com.google.cloud
google-cloud-spanner-parent
- 6.82.0
+ 6.83.1-SNAPSHOT
diff --git a/grpc-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/InstanceAdminGrpc.java b/grpc-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/InstanceAdminGrpc.java
index 81d08cb9dbe..1fad30fd9b0 100644
--- a/grpc-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/InstanceAdminGrpc.java
+++ b/grpc-google-cloud-spanner-admin-instance-v1/src/main/java/com/google/spanner/admin/instance/v1/InstanceAdminGrpc.java
@@ -1114,6 +1114,8 @@ public interface AsyncService {
*
*
* Lists the supported instance configurations for a given project.
+ * Returns both Google-managed configurations and user-managed
+ * configurations.
*
*/
default void listInstanceConfigs(
@@ -1145,7 +1147,7 @@ default void getInstanceConfig(
*
*
* Creates an instance configuration and begins preparing it to be used. The
- * returned [long-running operation][google.longrunning.Operation]
+ * returned long-running operation
* can be used to track the progress of preparing the new
* instance configuration. The instance configuration name is assigned by the
* caller. If the named instance configuration already exists,
@@ -1165,13 +1167,13 @@ default void getInstanceConfig(
* * The instance configuration's
* [reconciling][google.spanner.admin.instance.v1.InstanceConfig.reconciling]
* field becomes false. Its state becomes `READY`.
- * The returned [long-running operation][google.longrunning.Operation] will
+ * The returned long-running operation will
* have a name of the format
* `<instance_config_name>/operations/<operation_id>` and can be used to track
* creation of the instance configuration. The
- * [metadata][google.longrunning.Operation.metadata] field type is
+ * metadata field type is
* [CreateInstanceConfigMetadata][google.spanner.admin.instance.v1.CreateInstanceConfigMetadata].
- * The [response][google.longrunning.Operation.response] field type is
+ * The response field type is
* [InstanceConfig][google.spanner.admin.instance.v1.InstanceConfig], if
* successful.
* Authorization requires `spanner.instanceConfigs.create` permission on
@@ -1191,7 +1193,7 @@ default void createInstanceConfig(
*
*
* Updates an instance configuration. The returned
- * [long-running operation][google.longrunning.Operation] can be used to track
+ * long-running operation can be used to track
* the progress of updating the instance. If the named instance configuration
* does not exist, returns `NOT_FOUND`.
* Only user-managed configurations can be updated.
@@ -1214,13 +1216,13 @@ default void createInstanceConfig(
* * The instance configuration's
* [reconciling][google.spanner.admin.instance.v1.InstanceConfig.reconciling]
* field becomes false.
- * The returned [long-running operation][google.longrunning.Operation] will
+ * The returned long-running operation will
* have a name of the format
* `<instance_config_name>/operations/<operation_id>` and can be used to track
* the instance configuration modification. The
- * [metadata][google.longrunning.Operation.metadata] field type is
+ * metadata field type is
* [UpdateInstanceConfigMetadata][google.spanner.admin.instance.v1.UpdateInstanceConfigMetadata].
- * The [response][google.longrunning.Operation.response] field type is
+ * The response field type is
* [InstanceConfig][google.spanner.admin.instance.v1.InstanceConfig], if
* successful.
* Authorization requires `spanner.instanceConfigs.update` permission on
@@ -1257,12 +1259,12 @@ default void deleteInstanceConfig(
*
*
*
- * Lists the user-managed instance configuration [long-running
- * operations][google.longrunning.Operation] in the given project. An instance
+ * Lists the user-managed instance configuration long-running
+ * operations in the given project. An instance
* configuration operation has a name of the form
* `projects/<project>/instanceConfigs/<instance_config>/operations/<operation>`.
* The long-running operation
- * [metadata][google.longrunning.Operation.metadata] field type
+ * metadata field type
* `metadata.type_url` describes the type of the metadata. Operations returned
* include those that have completed/failed/canceled within the last 7 days,
* and pending operations. Operations returned are ordered by
@@ -1330,7 +1332,7 @@ default void getInstance(
*
*
* Creates an instance and begins preparing it to begin serving. The
- * returned [long-running operation][google.longrunning.Operation]
+ * returned long-running operation
* can be used to track the progress of preparing the new
* instance. The instance name is assigned by the caller. If the
* named instance already exists, `CreateInstance` returns
@@ -1349,12 +1351,12 @@ default void getInstance(
* * Databases can be created in the instance.
* * The instance's allocated resource levels are readable via the API.
* * The instance's state becomes `READY`.
- * The returned [long-running operation][google.longrunning.Operation] will
+ * The returned long-running operation will
* have a name of the format `<instance_name>/operations/<operation_id>` and
* can be used to track creation of the instance. The
- * [metadata][google.longrunning.Operation.metadata] field type is
+ * metadata field type is
* [CreateInstanceMetadata][google.spanner.admin.instance.v1.CreateInstanceMetadata].
- * The [response][google.longrunning.Operation.response] field type is
+ * The response field type is
* [Instance][google.spanner.admin.instance.v1.Instance], if successful.
*
*/
@@ -1370,8 +1372,7 @@ default void createInstance(
*
*
* Updates an instance, and begins allocating or releasing resources
- * as requested. The returned [long-running
- * operation][google.longrunning.Operation] can be used to track the
+ * as requested. The returned long-running operation can be used to track the
* progress of updating the instance. If the named instance does not
* exist, returns `NOT_FOUND`.
* Immediately upon completion of this request:
@@ -1392,12 +1393,12 @@ default void createInstance(
* * All newly-reserved resources are available for serving the instance's
* tables.
* * The instance's new resource levels are readable via the API.
- * The returned [long-running operation][google.longrunning.Operation] will
+ * The returned long-running operation will
* have a name of the format `<instance_name>/operations/<operation_id>` and
* can be used to track the instance modification. The
- * [metadata][google.longrunning.Operation.metadata] field type is
+ * metadata field type is
* [UpdateInstanceMetadata][google.spanner.admin.instance.v1.UpdateInstanceMetadata].
- * The [response][google.longrunning.Operation.response] field type is
+ * The response field type is
* [Instance][google.spanner.admin.instance.v1.Instance], if successful.
* Authorization requires `spanner.instances.update` permission on
* the resource [name][google.spanner.admin.instance.v1.Instance.name].
@@ -1503,7 +1504,7 @@ default void getInstancePartition(
*
*
* Creates an instance partition and begins preparing it to be used. The
- * returned [long-running operation][google.longrunning.Operation]
+ * returned long-running operation
* can be used to track the progress of preparing the new instance partition.
* The instance partition name is assigned by the caller. If the named
* instance partition already exists, `CreateInstancePartition` returns
@@ -1523,13 +1524,13 @@ default void getInstancePartition(
* * The instance partition's allocated resource levels are readable via the
* API.
* * The instance partition's state becomes `READY`.
- * The returned [long-running operation][google.longrunning.Operation] will
+ * The returned long-running operation will
* have a name of the format
* `<instance_partition_name>/operations/<operation_id>` and can be used to
* track creation of the instance partition. The
- * [metadata][google.longrunning.Operation.metadata] field type is
+ * metadata field type is
* [CreateInstancePartitionMetadata][google.spanner.admin.instance.v1.CreateInstancePartitionMetadata].
- * The [response][google.longrunning.Operation.response] field type is
+ * The response field type is
* [InstancePartition][google.spanner.admin.instance.v1.InstancePartition], if
* successful.
*
@@ -1565,8 +1566,7 @@ default void deleteInstancePartition(
*
*
* Updates an instance partition, and begins allocating or releasing resources
- * as requested. The returned [long-running
- * operation][google.longrunning.Operation] can be used to track the
+ * as requested. The returned long-running operation can be used to track the
* progress of updating the instance partition. If the named instance
* partition does not exist, returns `NOT_FOUND`.
* Immediately upon completion of this request:
@@ -1588,13 +1588,13 @@ default void deleteInstancePartition(
* * All newly-reserved resources are available for serving the instance
* partition's tables.
* * The instance partition's new resource levels are readable via the API.
- * The returned [long-running operation][google.longrunning.Operation] will
+ * The returned long-running operation will
* have a name of the format
* `<instance_partition_name>/operations/<operation_id>` and can be used to
* track the instance partition modification. The
- * [metadata][google.longrunning.Operation.metadata] field type is
+ * metadata field type is
* [UpdateInstancePartitionMetadata][google.spanner.admin.instance.v1.UpdateInstancePartitionMetadata].
- * The [response][google.longrunning.Operation.response] field type is
+ * The response field type is
* [InstancePartition][google.spanner.admin.instance.v1.InstancePartition], if
* successful.
* Authorization requires `spanner.instancePartitions.update` permission on
@@ -1613,12 +1613,11 @@ default void updateInstancePartition(
*
*
*
- * Lists instance partition [long-running
- * operations][google.longrunning.Operation] in the given instance.
+ * Lists instance partition long-running operations in the given instance.
* An instance partition operation has a name of the form
* `projects/<project>/instances/<instance>/instancePartitions/<instance_partition>/operations/<operation>`.
* The long-running operation
- * [metadata][google.longrunning.Operation.metadata] field type
+ * metadata field type
* `metadata.type_url` describes the type of the metadata. Operations returned
* include those that have completed/failed/canceled within the last 7 days,
* and pending operations. Operations returned are ordered by
@@ -1643,7 +1642,7 @@ default void listInstancePartitionOperations(
*
*
* Moves an instance to the target instance configuration. You can use the
- * returned [long-running operation][google.longrunning.Operation] to track
+ * returned long-running operation to track
* the progress of moving the instance.
* `MoveInstance` returns `FAILED_PRECONDITION` if the instance meets any of
* the following criteria:
@@ -1667,13 +1666,13 @@ default void listInstancePartitionOperations(
* * The instance might experience higher read-write latencies and a higher
* transaction abort rate. However, moving an instance doesn't cause any
* downtime.
- * The returned [long-running operation][google.longrunning.Operation] has
+ * The returned long-running operation has
* a name of the format
* `<instance_name>/operations/<operation_id>` and can be used to track
* the move instance operation. The
- * [metadata][google.longrunning.Operation.metadata] field type is
+ * metadata field type is
* [MoveInstanceMetadata][google.spanner.admin.instance.v1.MoveInstanceMetadata].
- * The [response][google.longrunning.Operation.response] field type is
+ * The response field type is
* [Instance][google.spanner.admin.instance.v1.Instance],
* if successful.
* Cancelling the operation sets its metadata's
@@ -1775,6 +1774,8 @@ protected InstanceAdminStub build(io.grpc.Channel channel, io.grpc.CallOptions c
*
*
* Lists the supported instance configurations for a given project.
+ * Returns both Google-managed configurations and user-managed
+ * configurations.
*
*/
public void listInstanceConfigs(
@@ -1810,7 +1811,7 @@ public void getInstanceConfig(
*
*
* Creates an instance configuration and begins preparing it to be used. The
- * returned [long-running operation][google.longrunning.Operation]
+ * returned long-running operation
* can be used to track the progress of preparing the new
* instance configuration. The instance configuration name is assigned by the
* caller. If the named instance configuration already exists,
@@ -1830,13 +1831,13 @@ public void getInstanceConfig(
* * The instance configuration's
* [reconciling][google.spanner.admin.instance.v1.InstanceConfig.reconciling]
* field becomes false. Its state becomes `READY`.
- * The returned [long-running operation][google.longrunning.Operation] will
+ * The returned long-running operation will
* have a name of the format
* `<instance_config_name>/operations/<operation_id>` and can be used to track
* creation of the instance configuration. The
- * [metadata][google.longrunning.Operation.metadata] field type is
+ * metadata field type is
* [CreateInstanceConfigMetadata][google.spanner.admin.instance.v1.CreateInstanceConfigMetadata].
- * The [response][google.longrunning.Operation.response] field type is
+ * The response field type is
* [InstanceConfig][google.spanner.admin.instance.v1.InstanceConfig], if
* successful.
* Authorization requires `spanner.instanceConfigs.create` permission on
@@ -1858,7 +1859,7 @@ public void createInstanceConfig(
*
*
* Updates an instance configuration. The returned
- * [long-running operation][google.longrunning.Operation] can be used to track
+ * long-running operation can be used to track
* the progress of updating the instance. If the named instance configuration
* does not exist, returns `NOT_FOUND`.
* Only user-managed configurations can be updated.
@@ -1881,13 +1882,13 @@ public void createInstanceConfig(
* * The instance configuration's
* [reconciling][google.spanner.admin.instance.v1.InstanceConfig.reconciling]
* field becomes false.
- * The returned [long-running operation][google.longrunning.Operation] will
+ * The returned long-running operation will
* have a name of the format
* `<instance_config_name>/operations/<operation_id>` and can be used to track
* the instance configuration modification. The
- * [metadata][google.longrunning.Operation.metadata] field type is
+ * metadata field type is
* [UpdateInstanceConfigMetadata][google.spanner.admin.instance.v1.UpdateInstanceConfigMetadata].
- * The [response][google.longrunning.Operation.response] field type is
+ * The response field type is
* [InstanceConfig][google.spanner.admin.instance.v1.InstanceConfig], if
* successful.
* Authorization requires `spanner.instanceConfigs.update` permission on
@@ -1928,12 +1929,12 @@ public void deleteInstanceConfig(
*
*
*
- * Lists the user-managed instance configuration [long-running
- * operations][google.longrunning.Operation] in the given project. An instance
+ * Lists the user-managed instance configuration long-running
+ * operations in the given project. An instance
* configuration operation has a name of the form
* `projects/<project>/instanceConfigs/<instance_config>/operations/<operation>`.
* The long-running operation
- * [metadata][google.longrunning.Operation.metadata] field type
+ * metadata field type
* `metadata.type_url` describes the type of the metadata. Operations returned
* include those that have completed/failed/canceled within the last 7 days,
* and pending operations. Operations returned are ordered by
@@ -2009,7 +2010,7 @@ public void getInstance(
*
*
* Creates an instance and begins preparing it to begin serving. The
- * returned [long-running operation][google.longrunning.Operation]
+ * returned long-running operation
* can be used to track the progress of preparing the new
* instance. The instance name is assigned by the caller. If the
* named instance already exists, `CreateInstance` returns
@@ -2028,12 +2029,12 @@ public void getInstance(
* * Databases can be created in the instance.
* * The instance's allocated resource levels are readable via the API.
* * The instance's state becomes `READY`.
- * The returned [long-running operation][google.longrunning.Operation] will
+ * The returned long-running operation will
* have a name of the format `<instance_name>/operations/<operation_id>` and
* can be used to track creation of the instance. The
- * [metadata][google.longrunning.Operation.metadata] field type is
+ * metadata field type is
* [CreateInstanceMetadata][google.spanner.admin.instance.v1.CreateInstanceMetadata].
- * The [response][google.longrunning.Operation.response] field type is
+ * The response field type is
* [Instance][google.spanner.admin.instance.v1.Instance], if successful.
*
*/
@@ -2051,8 +2052,7 @@ public void createInstance(
*
*
* Updates an instance, and begins allocating or releasing resources
- * as requested. The returned [long-running
- * operation][google.longrunning.Operation] can be used to track the
+ * as requested. The returned long-running operation can be used to track the
* progress of updating the instance. If the named instance does not
* exist, returns `NOT_FOUND`.
* Immediately upon completion of this request:
@@ -2073,12 +2073,12 @@ public void createInstance(
* * All newly-reserved resources are available for serving the instance's
* tables.
* * The instance's new resource levels are readable via the API.
- * The returned [long-running operation][google.longrunning.Operation] will
+ * The returned long-running operation will
* have a name of the format `<instance_name>/operations/<operation_id>` and
* can be used to track the instance modification. The
- * [metadata][google.longrunning.Operation.metadata] field type is
+ * metadata field type is
* [UpdateInstanceMetadata][google.spanner.admin.instance.v1.UpdateInstanceMetadata].
- * The [response][google.longrunning.Operation.response] field type is
+ * The response field type is
* [Instance][google.spanner.admin.instance.v1.Instance], if successful.
* Authorization requires `spanner.instances.update` permission on
* the resource [name][google.spanner.admin.instance.v1.Instance.name].
@@ -2196,7 +2196,7 @@ public void getInstancePartition(
*
*
* Creates an instance partition and begins preparing it to be used. The
- * returned [long-running operation][google.longrunning.Operation]
+ * returned long-running operation
* can be used to track the progress of preparing the new instance partition.
* The instance partition name is assigned by the caller. If the named
* instance partition already exists, `CreateInstancePartition` returns
@@ -2216,13 +2216,13 @@ public void getInstancePartition(
* * The instance partition's allocated resource levels are readable via the
* API.
* * The instance partition's state becomes `READY`.
- * The returned [long-running operation][google.longrunning.Operation] will
+ * The returned long-running operation will
* have a name of the format
* `<instance_partition_name>/operations/<operation_id>` and can be used to
* track creation of the instance partition. The
- * [metadata][google.longrunning.Operation.metadata] field type is
+ * metadata field type is
* [CreateInstancePartitionMetadata][google.spanner.admin.instance.v1.CreateInstancePartitionMetadata].
- * The [response][google.longrunning.Operation.response] field type is
+ * The response field type is
* [InstancePartition][google.spanner.admin.instance.v1.InstancePartition], if
* successful.
*
@@ -2262,8 +2262,7 @@ public void deleteInstancePartition(
*
*
* Updates an instance partition, and begins allocating or releasing resources
- * as requested. The returned [long-running
- * operation][google.longrunning.Operation] can be used to track the
+ * as requested. The returned long-running operation can be used to track the
* progress of updating the instance partition. If the named instance
* partition does not exist, returns `NOT_FOUND`.
* Immediately upon completion of this request:
@@ -2285,13 +2284,13 @@ public void deleteInstancePartition(
* * All newly-reserved resources are available for serving the instance
* partition's tables.
* * The instance partition's new resource levels are readable via the API.
- * The returned [long-running operation][google.longrunning.Operation] will
+ * The returned long-running operation will
* have a name of the format
* `<instance_partition_name>/operations/<operation_id>` and can be used to
* track the instance partition modification. The
- * [metadata][google.longrunning.Operation.metadata] field type is
+ * metadata field type is
* [UpdateInstancePartitionMetadata][google.spanner.admin.instance.v1.UpdateInstancePartitionMetadata].
- * The [response][google.longrunning.Operation.response] field type is
+ * The response field type is
* [InstancePartition][google.spanner.admin.instance.v1.InstancePartition], if
* successful.
* Authorization requires `spanner.instancePartitions.update` permission on
@@ -2312,12 +2311,11 @@ public void updateInstancePartition(
*
*
* |