diff --git a/.github/.OwlBot.yaml b/.github/.OwlBot-hermetic.yaml
similarity index 97%
rename from .github/.OwlBot.yaml
rename to .github/.OwlBot-hermetic.yaml
index f8afbf407f5..ec923ff560e 100644
--- a/.github/.OwlBot.yaml
+++ b/.github/.OwlBot-hermetic.yaml
@@ -11,10 +11,6 @@
# 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.
-
-docker:
- image: "gcr.io/cloud-devrel-public-resources/owlbot-java:latest"
-
deep-remove-regex:
- "/grpc-google-.*/src"
- "/proto-google-.*/src"
diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml
deleted file mode 100644
index 6983bb26347..00000000000
--- a/.github/.OwlBot.lock.yaml
+++ /dev/null
@@ -1,17 +0,0 @@
-# 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.
-docker:
- image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest
- digest: sha256:25b384ee1674eda3984ec41c15b514a63bbeb5eda4d57c73c7e6f5adef2fd2f1
-# created: 2024-04-05T19:12:34.133475268Z
diff --git a/.github/release-please.yml b/.github/release-please.yml
index 67621e4ea6c..2853b1763cf 100644
--- a/.github/release-please.yml
+++ b/.github/release-please.yml
@@ -34,3 +34,11 @@ branches:
bumpMinorPreMajor: true
handleGHRelease: true
branch: 6.55.x
+ - releaseType: java-backport
+ bumpMinorPreMajor: true
+ handleGHRelease: true
+ branch: 6.67.x
+ - releaseType: java-backport
+ bumpMinorPreMajor: true
+ handleGHRelease: true
+ branch: 6.66.x
diff --git a/.github/scripts/update_generation_config.sh b/.github/scripts/update_generation_config.sh
new file mode 100644
index 00000000000..561a313040f
--- /dev/null
+++ b/.github/scripts/update_generation_config.sh
@@ -0,0 +1,121 @@
+#!/bin/bash
+set -e
+# This script should be run at the root of the repository.
+# This script is used to update googleapis_commitish, gapic_generator_version,
+# and libraries_bom_version in generation configuration at the time of running
+# and create a pull request.
+
+# The following commands need to be installed before running the script:
+# 1. git
+# 2. gh
+# 3. jq
+
+# Utility functions
+# Get the latest released version of a Maven artifact.
+function get_latest_released_version() {
+ local group_id=$1
+ local artifact_id=$2
+ latest=$(curl -s "https://search.maven.org/solrsearch/select?q=g:${group_id}+AND+a:${artifact_id}&core=gav&rows=500&wt=json" | jq -r '.response.docs[] | select(.v | test("^[0-9]+(\\.[0-9]+)*$")) | .v' | sort -V | tail -n 1)
+ echo "${latest}"
+}
+
+# Update a key to a new value in the generation config.
+function update_config() {
+ local key_word=$1
+ local new_value=$2
+ local file=$3
+ echo "Update ${key_word} to ${new_value} in ${file}"
+ sed -i -e "s/^${key_word}.*$/${key_word}: ${new_value}/" "${file}"
+}
+
+# The parameters of this script is:
+# 1. base_branch, the base branch of the result pull request.
+# 2. repo, organization/repo-name, e.g., googleapis/google-cloud-java
+# 3. [optional] generation_config, the path to the generation configuration,
+# the default value is generation_config.yaml in the repository root.
+while [[ $# -gt 0 ]]; do
+key="$1"
+case "${key}" in
+ --base_branch)
+ base_branch="$2"
+ shift
+ ;;
+ --repo)
+ repo="$2"
+ shift
+ ;;
+ --generation_config)
+ generation_config="$2"
+ shift
+ ;;
+ *)
+ echo "Invalid option: [$1]"
+ exit 1
+ ;;
+esac
+shift
+done
+
+if [ -z "${base_branch}" ]; then
+ echo "missing required argument --base_branch"
+ exit 1
+fi
+
+if [ -z "${repo}" ]; then
+ echo "missing required argument --repo"
+ exit 1
+fi
+
+if [ -z "${generation_config}" ]; then
+ generation_config="generation_config.yaml"
+ echo "Use default generation config: ${generation_config}"
+fi
+
+current_branch="generate-libraries-${base_branch}"
+title="chore: Update generation configuration at $(date)"
+
+# try to find a open pull request associated with the branch
+pr_num=$(gh pr list -s open -H "${current_branch}" -q . --json number | jq ".[] | .number")
+# create a branch if there's no open pull request associated with the
+# branch; otherwise checkout the pull request.
+if [ -z "${pr_num}" ]; then
+ git checkout -b "${current_branch}"
+else
+ gh pr checkout "${pr_num}"
+fi
+
+mkdir tmp-googleapis
+# use partial clone because only commit history is needed.
+git clone --filter=blob:none https://github.com/googleapis/googleapis.git tmp-googleapis
+pushd tmp-googleapis
+git pull
+latest_commit=$(git rev-parse HEAD)
+popd
+rm -rf tmp-googleapis
+update_config "googleapis_commitish" "${latest_commit}" "${generation_config}"
+
+# update gapic-generator-java version to the latest
+latest_version=$(get_latest_released_version "com.google.api" "gapic-generator-java")
+update_config "gapic_generator_version" "${latest_version}" "${generation_config}"
+
+# update libraries-bom version to the latest
+latest_version=$(get_latest_released_version "com.google.cloud" "libraries-bom")
+update_config "libraries_bom_version" "${latest_version}" "${generation_config}"
+
+git add "${generation_config}"
+changed_files=$(git diff --cached --name-only)
+if [[ "${changed_files}" == "" ]]; then
+ echo "The latest generation config is not changed."
+ echo "Skip committing to the pull request."
+ exit 0
+fi
+git commit -m "${title}"
+if [ -z "${pr_num}" ]; then
+ git remote add remote_repo https://cloud-java-bot:"${GH_TOKEN}@github.com/${repo}.git"
+ git fetch -q --unshallow remote_repo
+ git push -f remote_repo "${current_branch}"
+ gh pr create --title "${title}" --head "${current_branch}" --body "${title}" --base "${base_branch}"
+else
+ git push
+ gh pr edit "${pr_num}" --title "${title}" --body "${title}"
+fi
diff --git a/.github/sync-repo-settings.yaml b/.github/sync-repo-settings.yaml
index 9a71e7679c2..7ab67b223ec 100644
--- a/.github/sync-repo-settings.yaml
+++ b/.github/sync-repo-settings.yaml
@@ -19,7 +19,6 @@ branchProtectionRules:
- checkstyle
- compile (8)
- compile (11)
- - OwlBot Post Processor
- units-with-multiplexed-session (8)
- units-with-multiplexed-session (11)
- pattern: 3.3.x
@@ -141,7 +140,25 @@ branchProtectionRules:
- checkstyle
- compile (8)
- compile (11)
- - OwlBot Post Processor
+ - pattern: 6.66.x
+ isAdminEnforced: true
+ requiredApprovingReviewCount: 1
+ requiresCodeOwnerReviews: true
+ requiresStrictStatusChecks: false
+ requiredStatusCheckContexts:
+ - dependencies (17)
+ - lint
+ - javadoc
+ - units (8)
+ - units (11)
+ - 'Kokoro - Test: Integration'
+ - 'Kokoro - Test: Integration with Multiplexed Sessions'
+ - cla/google
+ - checkstyle
+ - compile (8)
+ - compile (11)
+ - units-with-multiplexed-session (8)
+ - units-with-multiplexed-session (11)
permissionRules:
- team: yoshi-admins
permission: admin
diff --git a/.github/workflows/approve-readme.yaml b/.github/workflows/approve-readme.yaml
index f5fc7d5169e..59f00b8eb6e 100644
--- a/.github/workflows/approve-readme.yaml
+++ b/.github/workflows/approve-readme.yaml
@@ -21,7 +21,7 @@ jobs:
runs-on: ubuntu-latest
if: github.repository_owner == 'googleapis' && github.head_ref == 'autosynth-readme'
steps:
- - uses: actions/github-script@v6
+ - uses: actions/github-script@v7
with:
github-token: ${{secrets.YOSHI_APPROVER_TOKEN}}
script: |
diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml
index 0e38c416770..7eca4c6d5f0 100644
--- a/.github/workflows/ci.yaml
+++ b/.github/workflows/ci.yaml
@@ -52,7 +52,7 @@ jobs:
- run: .kokoro/build.sh
env:
JOB_TYPE: test
- GOOGLE_CLOUD_SPANNER_ENABLE_MULTIPLEXED_SESSIONS: true
+ GOOGLE_CLOUD_SPANNER_MULTIPLEXED_SESSIONS: true
units-java8:
# Building using Java 17 and run the tests with Java 8 runtime
name: "units (8)"
@@ -91,7 +91,7 @@ jobs:
- run: .kokoro/build.sh
env:
JOB_TYPE: test
- GOOGLE_CLOUD_SPANNER_ENABLE_MULTIPLEXED_SESSIONS: true
+ GOOGLE_CLOUD_SPANNER_MULTIPLEXED_SESSIONS: true
windows:
runs-on: windows-latest
steps:
diff --git a/.github/workflows/hermetic_library_generation.yaml b/.github/workflows/hermetic_library_generation.yaml
new file mode 100644
index 00000000000..9399ebef235
--- /dev/null
+++ b/.github/workflows/hermetic_library_generation.yaml
@@ -0,0 +1,45 @@
+# 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.
+# GitHub action job to test core java library features on
+# downstream client libraries before they are released.
+name: Hermetic library generation upon generation config change through pull requests
+on:
+ pull_request:
+
+env:
+ REPO_FULL_NAME: ${{ github.event.pull_request.head.repo.full_name }}
+ GITHUB_REPOSITORY: ${{ github.repository }}
+jobs:
+ library_generation:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Determine whether the pull request comes from a fork
+ run: |
+ if [[ "${GITHUB_REPOSITORY}" != "${REPO_FULL_NAME}" ]]; then
+ echo "This PR comes from a fork. Skip library generation."
+ echo "SHOULD_RUN=false" >> $GITHUB_ENV
+ else
+ echo "SHOULD_RUN=true" >> $GITHUB_ENV
+ fi
+ - uses: actions/checkout@v4
+ if: env.SHOULD_RUN == 'true'
+ with:
+ fetch-depth: 0
+ token: ${{ secrets.CLOUD_JAVA_BOT_TOKEN }}
+ - uses: googleapis/sdk-platform-java/.github/scripts@v2.47.0
+ if: env.SHOULD_RUN == 'true'
+ with:
+ base_ref: ${{ github.base_ref }}
+ head_ref: ${{ github.head_ref }}
+ token: ${{ secrets.CLOUD_JAVA_BOT_TOKEN }}
diff --git a/.github/workflows/integration-tests-against-emulator-with-multiplexed-session.yaml b/.github/workflows/integration-tests-against-emulator-with-multiplexed-session.yaml
index 741fecb089d..bd7dfef3972 100644
--- a/.github/workflows/integration-tests-against-emulator-with-multiplexed-session.yaml
+++ b/.github/workflows/integration-tests-against-emulator-with-multiplexed-session.yaml
@@ -39,4 +39,4 @@ jobs:
env:
JOB_TYPE: test
SPANNER_EMULATOR_HOST: localhost:9010
- GOOGLE_CLOUD_SPANNER_ENABLE_MULTIPLEXED_SESSIONS: true
+ GOOGLE_CLOUD_SPANNER_MULTIPLEXED_SESSIONS: true
diff --git a/.github/workflows/renovate_config_check.yaml b/.github/workflows/renovate_config_check.yaml
index 87d8eb2be8c..7c5ec7865e1 100644
--- a/.github/workflows/renovate_config_check.yaml
+++ b/.github/workflows/renovate_config_check.yaml
@@ -14,7 +14,7 @@ jobs:
uses: actions/checkout@v4
- name: Set up Node.js
- uses: actions/setup-node@v3
+ uses: actions/setup-node@v4
with:
node-version: '20'
diff --git a/.github/workflows/unmanaged_dependency_check.yaml b/.github/workflows/unmanaged_dependency_check.yaml
index f6594602a26..ce5a61f9f07 100644
--- a/.github/workflows/unmanaged_dependency_check.yaml
+++ b/.github/workflows/unmanaged_dependency_check.yaml
@@ -17,6 +17,6 @@ jobs:
# repository
.kokoro/build.sh
- name: Unmanaged dependency check
- uses: googleapis/sdk-platform-java/java-shared-dependencies/unmanaged-dependency-check@google-cloud-shared-dependencies/v3.30.0
+ uses: googleapis/sdk-platform-java/java-shared-dependencies/unmanaged-dependency-check@google-cloud-shared-dependencies/v3.37.0
with:
bom-path: google-cloud-spanner-bom/pom.xml
diff --git a/.github/workflows/update_generation_config.yaml b/.github/workflows/update_generation_config.yaml
new file mode 100644
index 00000000000..f15c807853d
--- /dev/null
+++ b/.github/workflows/update_generation_config.yaml
@@ -0,0 +1,42 @@
+# 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.
+# GitHub action job to test core java library features on
+# downstream client libraries before they are released.
+name: Update generation configuration
+on:
+ schedule:
+ - cron: '0 2 * * *'
+ workflow_dispatch:
+
+jobs:
+ update-generation-config:
+ runs-on: ubuntu-24.04
+ env:
+ # the branch into which the pull request is merged
+ base_branch: main
+ steps:
+ - uses: actions/checkout@v4
+ with:
+ token: ${{ secrets.CLOUD_JAVA_BOT_TOKEN }}
+ - name: Update params in generation config to latest
+ shell: bash
+ run: |
+ set -x
+ [ -z "$(git config user.email)" ] && git config --global user.email "cloud-java-bot@google.com"
+ [ -z "$(git config user.name)" ] && git config --global user.name "cloud-java-bot"
+ bash .github/scripts/update_generation_config.sh \
+ --base_branch "${base_branch}"\
+ --repo ${{ github.repository }}
+ env:
+ GH_TOKEN: ${{ secrets.CLOUD_JAVA_BOT_TOKEN }}
diff --git a/.kokoro/build.sh b/.kokoro/build.sh
index d3eaf9922bb..f8ae5a96f37 100755
--- a/.kokoro/build.sh
+++ b/.kokoro/build.sh
@@ -48,6 +48,16 @@ if [[ ! -z "${GOOGLE_APPLICATION_CREDENTIALS}" && "${GOOGLE_APPLICATION_CREDENTI
export GOOGLE_APPLICATION_CREDENTIALS=$(realpath ${KOKORO_GFILE_DIR}/${GOOGLE_APPLICATION_CREDENTIALS})
fi
+# Start the Spanner emulator if the environment variable for it has been set.
+# TODO: Change if statement once the env var can be set in the config.
+#if [[ ! -z "${SPANNER_EMULATOR_HOST}" ]]; then
+if [[ "$JOB_TYPE" == "graalvm" ]] || [[ "$JOB_TYPE" == "graalvm17" ]]; then
+ echo "Starting emulator"
+ export SPANNER_EMULATOR_HOST=localhost:9010
+ docker pull gcr.io/cloud-spanner-emulator/emulator
+ docker run -d --rm --name spanner-emulator -p 9010:9010 -p 9020:9020 gcr.io/cloud-spanner-emulator/emulator
+fi
+
# Kokoro integration test uses both JDK 11 and JDK 8. We ensure the generated class files
# are compatible with Java 8 when running tests.
if [ -n "${JAVA8_HOME}" ]; then
@@ -233,6 +243,11 @@ clirr)
;;
esac
+if [[ ! -z "${SPANNER_EMULATOR_HOST}" ]]; then
+ echo "Stopping emulator"
+ docker container stop spanner-emulator
+fi
+
if [ "${REPORT_COVERAGE}" == "true" ]
then
bash ${KOKORO_GFILE_DIR}/codecov.sh
diff --git a/.kokoro/presubmit/graalvm-native-17.cfg b/.kokoro/presubmit/graalvm-native-17.cfg
index b20ec8ff352..0f8b919c91f 100644
--- a/.kokoro/presubmit/graalvm-native-17.cfg
+++ b/.kokoro/presubmit/graalvm-native-17.cfg
@@ -3,7 +3,7 @@
# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
- value: "gcr.io/cloud-devrel-public-resources/graalvm_sdk_platform_b:3.30.0"
+ value: "gcr.io/cloud-devrel-public-resources/graalvm_sdk_platform_b:3.37.0"
}
env_vars: {
diff --git a/.kokoro/presubmit/graalvm-native.cfg b/.kokoro/presubmit/graalvm-native.cfg
index aad0db97859..e6553bd6e41 100644
--- a/.kokoro/presubmit/graalvm-native.cfg
+++ b/.kokoro/presubmit/graalvm-native.cfg
@@ -3,7 +3,7 @@
# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
- value: "gcr.io/cloud-devrel-public-resources/graalvm_sdk_platform_a:3.30.0"
+ value: "gcr.io/cloud-devrel-public-resources/graalvm_sdk_platform_a:3.37.0"
}
env_vars: {
diff --git a/.kokoro/presubmit/integration-multiplexed-sessions-enabled.cfg b/.kokoro/presubmit/integration-multiplexed-sessions-enabled.cfg
index 0acb1a445b0..771405de422 100644
--- a/.kokoro/presubmit/integration-multiplexed-sessions-enabled.cfg
+++ b/.kokoro/presubmit/integration-multiplexed-sessions-enabled.cfg
@@ -33,6 +33,6 @@ env_vars: {
}
env_vars: {
- key: "GOOGLE_CLOUD_SPANNER_ENABLE_MULTIPLEXED_SESSIONS"
+ key: "GOOGLE_CLOUD_SPANNER_MULTIPLEXED_SESSIONS"
value: "true"
-}
\ No newline at end of file
+}
diff --git a/.readme-partials.yaml b/.readme-partials.yaml
index 5c4e1db63b7..65ae24d8b58 100644
--- a/.readme-partials.yaml
+++ b/.readme-partials.yaml
@@ -144,12 +144,45 @@ custom_content: |
.build()
SpannerOptions options = SpannerOptions.newBuilder()
- // Inject OpenTelemetry object via Spanner Options or register OpenTelmetry object as Global
+ // Inject OpenTelemetry object via Spanner Options or register OpenTelemetry object as Global
.setOpenTelemetry(openTelemetry)
.build();
Spanner spanner = options.getService();
```
+
+ #### OpenTelemetry SQL Statement Tracing
+ The OpenTelemetry traces that are generated by the Java client include any request and transaction
+ tags that have been set. The traces can also include the SQL statements that are executed and the
+ name of the thread that executes the statement. Enable this with the `enableExtendedTracing`
+ option:
+
+ ```
+ SpannerOptions options = SpannerOptions.newBuilder()
+ .setOpenTelemetry(openTelemetry)
+ .setEnableExtendedTracing(true)
+ .build();
+ ```
+
+ This option can also be enabled by setting the environment variable
+ `SPANNER_ENABLE_EXTENDED_TRACING=true`.
+
+ #### OpenTelemetry API Tracing
+ You can enable tracing of each API call that the Spanner client executes with the `enableApiTracing`
+ option. These traces also include any retry attempts for an API call:
+
+ ```
+ SpannerOptions options = SpannerOptions.newBuilder()
+ .setOpenTelemetry(openTelemetry)
+ .setEnableApiTracing(true)
+ .build();
+ ```
+
+ This option can also be enabled by setting the environment variable
+ `SPANNER_ENABLE_API_TRACING=true`.
+
+ > Note: The attribute keys that are used for additional information about retry attempts and the number of requests might change in a future release.
+
### Instrument with OpenCensus
@@ -283,6 +316,38 @@ custom_content: |
Spanner spanner = options.getService();
```
+
+ #### OpenTelemetry SQL Statement Tracing
+ The OpenTelemetry traces that are generated by the Java client include any request and transaction
+ tags that have been set. The traces can also include the SQL statements that are executed and the
+ name of the thread that executes the statement. Enable this with the `enableExtendedTracing`
+ option:
+
+ ```
+ SpannerOptions options = SpannerOptions.newBuilder()
+ .setOpenTelemetry(openTelemetry)
+ .setEnableExtendedTracing(true)
+ .build();
+ ```
+
+ This option can also be enabled by setting the environment variable
+ `SPANNER_ENABLE_EXTENDED_TRACING=true`.
+
+ #### OpenTelemetry API Tracing
+ You can enable tracing of each API call that the Spanner client executes with the `enableApiTracing`
+ option. These traces also include any retry attempts for an API call:
+
+ ```
+ SpannerOptions options = SpannerOptions.newBuilder()
+ .setOpenTelemetry(openTelemetry)
+ .setEnableApiTracing(true)
+ .build();
+ ```
+
+ This option can also be enabled by setting the environment variable
+ `SPANNER_ENABLE_API_TRACING=true`.
+
+ > Note: The attribute keys that are used for additional information about retry attempts and the number of requests might change in a future release.
## Migrate from OpenCensus to OpenTelemetry
diff --git a/.repo-metadata.json b/.repo-metadata.json
index 80355fa2aff..7848b32f2b6 100644
--- a/.repo-metadata.json
+++ b/.repo-metadata.json
@@ -2,21 +2,20 @@
"api_shortname": "spanner",
"name_pretty": "Cloud Spanner",
"product_documentation": "https://cloud.google.com/spanner/docs/",
+ "api_description": "is a fully managed, mission-critical, relational database service that offers transactional consistency at global scale, \\nschemas, SQL (ANSI 2011 with extensions), and automatic, synchronous replication \\nfor high availability.\\n\\nBe sure to activate the Cloud Spanner API on the Developer's Console to\\nuse Cloud Spanner from your project.",
"client_documentation": "https://cloud.google.com/java/docs/reference/google-cloud-spanner/latest/history",
- "api_description": "is a fully managed, mission-critical, \nrelational database service that offers transactional consistency at global scale, \nschemas, SQL (ANSI 2011 with extensions), and automatic, synchronous replication \nfor high availability.\n\nBe sure to activate the Cloud Spanner API on the Developer's Console to\nuse Cloud Spanner from your project.",
- "issue_tracker": "https://issuetracker.google.com/issues?q=componentid:190851%2B%20status:open",
"release_level": "stable",
+ "transport": "grpc",
"language": "java",
- "min_java_version": 8,
"repo": "googleapis/java-spanner",
"repo_short": "java-spanner",
"distribution_name": "com.google.cloud:google-cloud-spanner",
"api_id": "spanner.googleapis.com",
- "transport": "grpc",
+ "library_type": "GAPIC_COMBO",
"requires_billing": true,
"codeowner_team": "@googleapis/api-spanner-java",
- "library_type": "GAPIC_COMBO",
"excluded_poms": "google-cloud-spanner-bom",
- "recommended_package": "com.google.cloud.spanner"
-}
-
+ "issue_tracker": "https://issuetracker.google.com/issues?q=componentid:190851%2B%20status:open",
+ "recommended_package": "com.google.cloud.spanner",
+ "min_java_version": 8
+}
\ No newline at end of file
diff --git a/CHANGELOG.md b/CHANGELOG.md
index a878fe0500f..b7e2901228f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,239 @@
# Changelog
+## [6.78.0](https://github.com/googleapis/java-spanner/compare/v6.77.0...v6.78.0) (2024-10-11)
+
+
+### Features
+
+* Define ReplicaComputeCapacity and AsymmetricAutoscalingOption ([f46a6b3](https://github.com/googleapis/java-spanner/commit/f46a6b34383fe45d63b2db912389b26067f3a853))
+
+
+### Bug Fixes
+
+* **deps:** Update the Java code generator (gapic-generator-java) to 2.47.0 ([139a715](https://github.com/googleapis/java-spanner/commit/139a715d3f617b20a00b0cf4f5819e5a61a87c96))
+
+
+### Dependencies
+
+* Update dependency com.google.cloud:google-cloud-trace to v2.52.0 ([#3393](https://github.com/googleapis/java-spanner/issues/3393)) ([79453f9](https://github.com/googleapis/java-spanner/commit/79453f9985eda10631cd29ae58c0cedf234c2e18))
+
+## [6.77.0](https://github.com/googleapis/java-spanner/compare/v6.76.0...v6.77.0) (2024-10-02)
+
+
+### Features
+
+* Add INTERVAL API ([c078ac3](https://github.com/googleapis/java-spanner/commit/c078ac34c3d14b13bbd4a507de4f0013975dca4e))
+
+
+### Dependencies
+
+* Update dependency com.google.api.grpc:proto-google-cloud-monitoring-v3 to v3.52.0 ([#3291](https://github.com/googleapis/java-spanner/issues/3291)) ([9241063](https://github.com/googleapis/java-spanner/commit/92410638b0ba88f8e89e28bd12dd58830f7aaeb3))
+* Update dependency com.google.cloud:google-cloud-monitoring to v3.52.0 ([#3292](https://github.com/googleapis/java-spanner/issues/3292)) ([da27a19](https://github.com/googleapis/java-spanner/commit/da27a1992e40b1b4591f0232f687d8031387e749))
+* Update dependency com.google.cloud:google-cloud-monitoring to v3.52.0 ([#3293](https://github.com/googleapis/java-spanner/issues/3293)) ([c6dbdb2](https://github.com/googleapis/java-spanner/commit/c6dbdb255eb4cd231a2dc7cef94bf3353fa7e837))
+* Update dependency com.google.cloud:google-cloud-trace to v2.51.0 ([#3294](https://github.com/googleapis/java-spanner/issues/3294)) ([a269747](https://github.com/googleapis/java-spanner/commit/a269747889ea0b2380f07e1efef3b288a9c4fd04))
+* Update dependency com.google.cloud:sdk-platform-java-config to v3.36.1 ([#3355](https://github.com/googleapis/java-spanner/issues/3355)) ([5191e71](https://github.com/googleapis/java-spanner/commit/5191e71a83a316b41564ce2604980c8f33135f2f))
+* Update dependency com.google.cloud.opentelemetry:exporter-metrics to v0.32.0 ([#3371](https://github.com/googleapis/java-spanner/issues/3371)) ([d5b5ca0](https://github.com/googleapis/java-spanner/commit/d5b5ca0cccc6cf73d759245d2bd72f33c7d39830))
+* Update dependency com.google.cloud.opentelemetry:exporter-trace to v0.32.0 ([#3372](https://github.com/googleapis/java-spanner/issues/3372)) ([aa9a71d](https://github.com/googleapis/java-spanner/commit/aa9a71d38dabd8d1974bb553761e93735ade5c26))
+* Update dependency commons-io:commons-io to v2.17.0 ([#3349](https://github.com/googleapis/java-spanner/issues/3349)) ([7c21164](https://github.com/googleapis/java-spanner/commit/7c21164f2b8e75afab268f2fb8e132a372ac0d67))
+* Update dependency io.opentelemetry:opentelemetry-bom to v1.42.1 ([#3323](https://github.com/googleapis/java-spanner/issues/3323)) ([95dfc02](https://github.com/googleapis/java-spanner/commit/95dfc02ae2d65f99219dcced66cf4e74d1c4975b))
+* Update dependency ubuntu to v24 ([#3356](https://github.com/googleapis/java-spanner/issues/3356)) ([042c294](https://github.com/googleapis/java-spanner/commit/042c294cc5f83eebd2e3600cffb165e5b467d63e))
+* Update googleapis/sdk-platform-java action to v2.46.1 ([#3354](https://github.com/googleapis/java-spanner/issues/3354)) ([378f5cf](https://github.com/googleapis/java-spanner/commit/378f5cfb08d4e5ee80b21007bfc829de61bfbdbe))
+* Update junixsocket.version to v2.10.1 ([#3367](https://github.com/googleapis/java-spanner/issues/3367)) ([5f94915](https://github.com/googleapis/java-spanner/commit/5f94915941c4e4132f8460a04dde0643fa63ab99))
+* Update opentelemetry.version to v1.42.1 ([#3330](https://github.com/googleapis/java-spanner/issues/3330)) ([7b05e43](https://github.com/googleapis/java-spanner/commit/7b05e4301953364617691e8ae225cea823e3a323))
+
+
+### Documentation
+
+* Update comment for PROFILE QueryMode ([c078ac3](https://github.com/googleapis/java-spanner/commit/c078ac34c3d14b13bbd4a507de4f0013975dca4e))
+
+## [6.76.0](https://github.com/googleapis/java-spanner/compare/v6.75.0...v6.76.0) (2024-09-27)
+
+
+### Features
+
+* Add opt-in flag and ClientInterceptor to propagate trace context for Spanner end to end tracing ([#3162](https://github.com/googleapis/java-spanner/issues/3162)) ([0b7fdaf](https://github.com/googleapis/java-spanner/commit/0b7fdaf1d25e81ca8dd35a0f8d8caa7b77a7e58c))
+* Add samples for backup schedule feature APIs. ([#3339](https://github.com/googleapis/java-spanner/issues/3339)) ([8cd5163](https://github.com/googleapis/java-spanner/commit/8cd516351e7859a81f00f17cb5071edbd804ea90))
+
+
+### Bug Fixes
+
+* **deps:** Update the Java code generator (gapic-generator-java) to 2.46.1 ([1719f44](https://github.com/googleapis/java-spanner/commit/1719f4465841354db3253fd132868394e530a82d))
+
+## [6.75.0](https://github.com/googleapis/java-spanner/compare/v6.74.1...v6.75.0) (2024-09-19)
+
+
+### Features
+
+* Support multiplexed session for blind write with single use transaction ([#3229](https://github.com/googleapis/java-spanner/issues/3229)) ([b3e2b0f](https://github.com/googleapis/java-spanner/commit/b3e2b0f4892951867715cb7f354c089fca4f050f))
+
+## [6.74.1](https://github.com/googleapis/java-spanner/compare/v6.74.0...v6.74.1) (2024-09-16)
+
+
+### Bug Fixes
+
+* Use core pool size 1 for maintainer ([#3314](https://github.com/googleapis/java-spanner/issues/3314)) ([cce008d](https://github.com/googleapis/java-spanner/commit/cce008d212535d32da990242973f7f517ca5d6dc))
+
+
+### Dependencies
+
+* Update dependency com.google.cloud:sdk-platform-java-config to v3.35.0 ([#3329](https://github.com/googleapis/java-spanner/issues/3329)) ([654835f](https://github.com/googleapis/java-spanner/commit/654835f2433b97665c74be9ec80c169ac905a720))
+
+## [6.74.0](https://github.com/googleapis/java-spanner/compare/v6.73.0...v6.74.0) (2024-08-27)
+
+
+### Features
+
+* **spanner:** Add edition field to the instance proto ([6b7e6ca](https://github.com/googleapis/java-spanner/commit/6b7e6ca109ea9679b5e36598d3c343fa40bff724))
+
+
+### Documentation
+
+* Change the example timestamps in Spanner Graph java sample code ([#3295](https://github.com/googleapis/java-spanner/issues/3295)) ([b6490b6](https://github.com/googleapis/java-spanner/commit/b6490b6a6ee2b7399431881a5e87b5ef7b577c89))
+
+## [6.73.0](https://github.com/googleapis/java-spanner/compare/v6.72.0...v6.73.0) (2024-08-22)
+
+
+### Features
+
+* Add option for cancelling queries when closing client ([#3276](https://github.com/googleapis/java-spanner/issues/3276)) ([95da1ed](https://github.com/googleapis/java-spanner/commit/95da1eddbc979f4ce78c9d1ac15bc4c1faba6dca))
+
+
+### Bug Fixes
+
+* Github workflow vulnerable to script injection ([#3232](https://github.com/googleapis/java-spanner/issues/3232)) ([599255c](https://github.com/googleapis/java-spanner/commit/599255c36d1fbe8317705a7eeb2a9e400c3efd15))
+* Make DecodeMode.DIRECT the deafult ([#3280](https://github.com/googleapis/java-spanner/issues/3280)) ([f31a95a](https://github.com/googleapis/java-spanner/commit/f31a95ab105407305e988e86c8f7b0d8654995e0))
+* Synchronize lazy ResultSet decoding ([#3267](https://github.com/googleapis/java-spanner/issues/3267)) ([4219cf8](https://github.com/googleapis/java-spanner/commit/4219cf86dba5e44d55f13ab118113f119c92b9e9))
+
+
+### Dependencies
+
+* Update dependency com.google.cloud:sdk-platform-java-config to v3.34.0 ([#3277](https://github.com/googleapis/java-spanner/issues/3277)) ([c449a91](https://github.com/googleapis/java-spanner/commit/c449a91628b005481996bce5ab449d62496a4d2d))
+* Update dependency commons-cli:commons-cli to v1.9.0 ([#3275](https://github.com/googleapis/java-spanner/issues/3275)) ([84790f7](https://github.com/googleapis/java-spanner/commit/84790f7d437e88739487b148bf963f0ac9dc3f96))
+* Update dependency io.opentelemetry:opentelemetry-bom to v1.41.0 ([#3269](https://github.com/googleapis/java-spanner/issues/3269)) ([a7458e9](https://github.com/googleapis/java-spanner/commit/a7458e970e4ca55ff3e312b2129e890576145db1))
+* Update dependency org.hamcrest:hamcrest to v3 ([#3271](https://github.com/googleapis/java-spanner/issues/3271)) ([fc2e343](https://github.com/googleapis/java-spanner/commit/fc2e343dc06f80617a2cd6f2bea59b0631e70678))
+* Update dependency org.junit.vintage:junit-vintage-engine to v5.11.0 ([#3272](https://github.com/googleapis/java-spanner/issues/3272)) ([1bc0c46](https://github.com/googleapis/java-spanner/commit/1bc0c469b99ebf3778592b04dbf175b00bf5b06e))
+* Update opentelemetry.version to v1.41.0 ([#3270](https://github.com/googleapis/java-spanner/issues/3270)) ([88f6b56](https://github.com/googleapis/java-spanner/commit/88f6b56fb243bb17b814a7ae150c8f38dced119a))
+
+
+### Documentation
+
+* Create a few code snippets as examples for using Spanner Graph using Java ([#3234](https://github.com/googleapis/java-spanner/issues/3234)) ([61f0ab7](https://github.com/googleapis/java-spanner/commit/61f0ab7a48bc3e51b830534b1cfa70e40166ec91))
+
+## [6.72.0](https://github.com/googleapis/java-spanner/compare/v6.71.0...v6.72.0) (2024-08-07)
+
+
+### Features
+
+* Add `RESOURCE_EXHAUSTED` to the list of retryable error codes ([e859b29](https://github.com/googleapis/java-spanner/commit/e859b29ccf4e68b1ab62cffdd4cf197011ba9878))
+* Add field order_by in spanner.proto ([e859b29](https://github.com/googleapis/java-spanner/commit/e859b29ccf4e68b1ab62cffdd4cf197011ba9878))
+* Add QueryCancellationAction message in executor protos ([e859b29](https://github.com/googleapis/java-spanner/commit/e859b29ccf4e68b1ab62cffdd4cf197011ba9878))
+* Add SessionPoolOptions, SpannerOptions protos in executor protos ([e859b29](https://github.com/googleapis/java-spanner/commit/e859b29ccf4e68b1ab62cffdd4cf197011ba9878))
+* Add support for multi region encryption config ([e859b29](https://github.com/googleapis/java-spanner/commit/e859b29ccf4e68b1ab62cffdd4cf197011ba9878))
+* Enable hermetic library generation ([#3129](https://github.com/googleapis/java-spanner/issues/3129)) ([94b2a86](https://github.com/googleapis/java-spanner/commit/94b2a8610ac02d2b4212c421f03b4e9561ec9949))
+* **spanner:** Add samples for instance partitions ([#3221](https://github.com/googleapis/java-spanner/issues/3221)) ([bc48bf2](https://github.com/googleapis/java-spanner/commit/bc48bf212e37441221b3b6c8742b07ff601f6c41))
+* **spanner:** Add support for Cloud Spanner Scheduled Backups ([e859b29](https://github.com/googleapis/java-spanner/commit/e859b29ccf4e68b1ab62cffdd4cf197011ba9878))
+* **spanner:** Adding `EXPECTED_FULFILLMENT_PERIOD` to the indicate instance creation times (with `FULFILLMENT_PERIOD_NORMAL` or `FULFILLMENT_PERIOD_EXTENDED` ENUM) with the extended instance creation time triggered by On-Demand Capacity Feature ([e859b29](https://github.com/googleapis/java-spanner/commit/e859b29ccf4e68b1ab62cffdd4cf197011ba9878))
+* **spanner:** Set manual affinity incase of gRPC-GCP extenstion ([#3215](https://github.com/googleapis/java-spanner/issues/3215)) ([86b306a](https://github.com/googleapis/java-spanner/commit/86b306a4189483a5fd2746052bed817443630567))
+* Support Read RPC OrderBy ([#3180](https://github.com/googleapis/java-spanner/issues/3180)) ([735bca5](https://github.com/googleapis/java-spanner/commit/735bca523e4ea53a24929fb2c27d282c41350e91))
+
+
+### Bug Fixes
+
+* Make sure commitAsync always finishes ([#3216](https://github.com/googleapis/java-spanner/issues/3216)) ([440c88b](https://github.com/googleapis/java-spanner/commit/440c88bd67e1c9d08445fe26b01bf243f7fd1ca4))
+* SessionPoolOptions.Builder#toBuilder() skipped useMultiplexedSessions ([#3197](https://github.com/googleapis/java-spanner/issues/3197)) ([027f92c](https://github.com/googleapis/java-spanner/commit/027f92cf32fee8217d2075db61fe0be58d43a40d))
+
+
+### Dependencies
+
+* Bump sdk-platform-java-config to 3.33.0 ([#3243](https://github.com/googleapis/java-spanner/issues/3243)) ([35907c6](https://github.com/googleapis/java-spanner/commit/35907c63ae981612ba24dd9605db493b5b864217))
+* Update dependencies to latest ([#3250](https://github.com/googleapis/java-spanner/issues/3250)) ([d1d566b](https://github.com/googleapis/java-spanner/commit/d1d566b096915a537e0978715c81bfca00e34ceb))
+* Update dependency com.google.auto.value:auto-value-annotations to v1.11.0 ([#3191](https://github.com/googleapis/java-spanner/issues/3191)) ([065cd48](https://github.com/googleapis/java-spanner/commit/065cd489964aaee42fffe1e71327906bde907205))
+* Update dependency com.google.cloud:google-cloud-trace to v2.47.0 ([#3067](https://github.com/googleapis/java-spanner/issues/3067)) ([e336ab8](https://github.com/googleapis/java-spanner/commit/e336ab81a1d392d56386f9302bf51bf14e385dad))
+
+## [6.71.0](https://github.com/googleapis/java-spanner/compare/v6.70.0...v6.71.0) (2024-07-03)
+
+
+### Features
+
+* Include thread name in traces ([#3173](https://github.com/googleapis/java-spanner/issues/3173)) ([92b1e07](https://github.com/googleapis/java-spanner/commit/92b1e079e6093bc4a2e7b458c1bbe0f62a0fada9))
+* Support multiplexed sessions for RO transactions ([#3141](https://github.com/googleapis/java-spanner/issues/3141)) ([2b8e9ed](https://github.com/googleapis/java-spanner/commit/2b8e9ededc1ea1a5e8d4f90083f2cf862fcc198a))
+
+## [6.70.0](https://github.com/googleapis/java-spanner/compare/v6.69.0...v6.70.0) (2024-06-27)
+
+
+### Features
+
+* Add field order_by in spanner.proto ([#3064](https://github.com/googleapis/java-spanner/issues/3064)) ([52ee196](https://github.com/googleapis/java-spanner/commit/52ee1967ee3a37fb0482ad8b51c6e77e28b79844))
+
+
+### Bug Fixes
+
+* Do not end transaction span when rolling back to savepoint ([#3167](https://github.com/googleapis/java-spanner/issues/3167)) ([8ec0cf2](https://github.com/googleapis/java-spanner/commit/8ec0cf2032dece545c9e4d8a794b80d06550b710))
+* Remove unused DmlBatch span ([#3147](https://github.com/googleapis/java-spanner/issues/3147)) ([f7891c1](https://github.com/googleapis/java-spanner/commit/f7891c1ca42727c775cdbe91bff8d55191a3d799))
+
+
+### Dependencies
+
+* Update dependencies ([#3181](https://github.com/googleapis/java-spanner/issues/3181)) ([0c787e6](https://github.com/googleapis/java-spanner/commit/0c787e6fa67d2a259a76bbd2d7f1cfa20a1dbee8))
+* Update dependency com.google.cloud:sdk-platform-java-config to v3.32.0 ([#3184](https://github.com/googleapis/java-spanner/issues/3184)) ([9c85a6f](https://github.com/googleapis/java-spanner/commit/9c85a6fabea527253ea40a8970cc9071804d94c4))
+* Update dependency commons-cli:commons-cli to v1.8.0 ([#3073](https://github.com/googleapis/java-spanner/issues/3073)) ([36b5340](https://github.com/googleapis/java-spanner/commit/36b5340ef8bf197fbc8ed882f76caff9a6fe84b6))
+
+## [6.69.0](https://github.com/googleapis/java-spanner/compare/v6.68.1...v6.69.0) (2024-06-12)
+
+
+### Features
+
+* Add option to enable ApiTracer ([#3095](https://github.com/googleapis/java-spanner/issues/3095)) ([a0a4bc5](https://github.com/googleapis/java-spanner/commit/a0a4bc58d4269a8c1e5e76d9a0469f649bb69148))
+
+
+### Dependencies
+
+* Update dependency com.google.cloud:sdk-platform-java-config to v3.31.0 ([#3159](https://github.com/googleapis/java-spanner/issues/3159)) ([1ee19d1](https://github.com/googleapis/java-spanner/commit/1ee19d19c2db30d79c8741cc5739de1c69fb95f9))
+
+## [6.68.1](https://github.com/googleapis/java-spanner/compare/v6.68.0...v6.68.1) (2024-05-29)
+
+
+### Bug Fixes
+
+* Make SessionPoolOptions#setUseMultiplexedSession(boolean) package private ([#3130](https://github.com/googleapis/java-spanner/issues/3130)) ([575c3e0](https://github.com/googleapis/java-spanner/commit/575c3e01541e12294dd37a622f0b1dca52d200ba))
+
+## [6.68.0](https://github.com/googleapis/java-spanner/compare/v6.67.0...v6.68.0) (2024-05-27)
+
+
+### Features
+
+* [java] allow passing libraries_bom_version from env ([#1967](https://github.com/googleapis/java-spanner/issues/1967)) ([#3112](https://github.com/googleapis/java-spanner/issues/3112)) ([7d5a52c](https://github.com/googleapis/java-spanner/commit/7d5a52c19a4b8028b78fc64a10f1ba6127fa6ffe))
+* Allow DML batches in transactions to execute analyzeUpdate ([#3114](https://github.com/googleapis/java-spanner/issues/3114)) ([dee7cda](https://github.com/googleapis/java-spanner/commit/dee7cdabe74058434e4d630846f066dc82fdf512))
+* **spanner:** Add support for Proto Columns in Connection API ([#3123](https://github.com/googleapis/java-spanner/issues/3123)) ([7e7c814](https://github.com/googleapis/java-spanner/commit/7e7c814045dc84aaa57e7c716b0221e6cb19bcd1))
+
+
+### Bug Fixes
+
+* Allow getMetadata() calls before calling next() ([#3111](https://github.com/googleapis/java-spanner/issues/3111)) ([39902c3](https://github.com/googleapis/java-spanner/commit/39902c384f3f7f9438252cbee287f2428faf1440))
+
+
+### Dependencies
+
+* Update dependency org.graalvm.buildtools:native-maven-plugin to v0.10.2 ([#3117](https://github.com/googleapis/java-spanner/issues/3117)) ([ddebbbb](https://github.com/googleapis/java-spanner/commit/ddebbbbeef976f61f23cdd66c5f7c1f412e2f9bd))
+
+## [6.67.0](https://github.com/googleapis/java-spanner/compare/v6.66.0...v6.67.0) (2024-05-22)
+
+
+### Features
+
+* Add tracing for batchUpdate, executeUpdate, and connections ([#3097](https://github.com/googleapis/java-spanner/issues/3097)) ([45cdcfc](https://github.com/googleapis/java-spanner/commit/45cdcfcde02aa7976b017a90f81c2ccd28658c8f))
+
+
+### Performance Improvements
+
+* Minor optimizations to the standard query path ([#3101](https://github.com/googleapis/java-spanner/issues/3101)) ([ec820a1](https://github.com/googleapis/java-spanner/commit/ec820a16e2b3cb1a12a15231491b75cd73afaa13))
+
+
+### Dependencies
+
+* Update dependency com.google.cloud:google-cloud-monitoring to v3.44.0 ([#3099](https://github.com/googleapis/java-spanner/issues/3099)) ([da44e93](https://github.com/googleapis/java-spanner/commit/da44e932a39ac0124b63914f8ea926998c10ea2e))
+* Update dependency com.google.cloud:sdk-platform-java-config to v3.30.1 ([#3116](https://github.com/googleapis/java-spanner/issues/3116)) ([d205a73](https://github.com/googleapis/java-spanner/commit/d205a73714786a609673012b771e7a0722b3e1f2))
+
## [6.66.0](https://github.com/googleapis/java-spanner/compare/v6.65.1...v6.66.0) (2024-05-03)
diff --git a/README.md b/README.md
index fd69927635d..4f12f6e18e0 100644
--- a/README.md
+++ b/README.md
@@ -19,7 +19,7 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file:
com.google.cloudlibraries-bom
- 26.37.0
+ 26.48.0pomimport
@@ -36,13 +36,12 @@ If you are using Maven with [BOM][libraries-bom], add this to your pom.xml file:
If you are using Maven without the BOM, add this to your dependencies:
-
```xml
com.google.cloudgoogle-cloud-spanner
- 6.65.1
+ 6.76.0
```
@@ -50,22 +49,21 @@ If you are using Maven without the BOM, add this to your dependencies:
If you are using Gradle 5.x or later, add this to your dependencies:
```Groovy
-implementation platform('com.google.cloud:libraries-bom:26.38.0')
+implementation platform('com.google.cloud:libraries-bom:26.48.0')
implementation 'com.google.cloud:google-cloud-spanner'
```
If you are using Gradle without BOM, add this to your dependencies:
```Groovy
-implementation 'com.google.cloud:google-cloud-spanner:6.66.0'
+implementation 'com.google.cloud:google-cloud-spanner:6.78.0'
```
If you are using SBT, add this to your dependencies:
```Scala
-libraryDependencies += "com.google.cloud" % "google-cloud-spanner" % "6.66.0"
+libraryDependencies += "com.google.cloud" % "google-cloud-spanner" % "6.78.0"
```
-
## Authentication
@@ -93,13 +91,7 @@ to add `google-cloud-spanner` as a dependency in your code.
## About Cloud Spanner
-[Cloud Spanner][product-docs] is a fully managed, mission-critical,
-relational database service that offers transactional consistency at global scale,
-schemas, SQL (ANSI 2011 with extensions), and automatic, synchronous replication
-for high availability.
-
-Be sure to activate the Cloud Spanner API on the Developer's Console to
-use Cloud Spanner from your project.
+[Cloud Spanner][product-docs] is a fully managed, mission-critical, relational database service that offers transactional consistency at global scale, \nschemas, SQL (ANSI 2011 with extensions), and automatic, synchronous replication \nfor high availability.\n\nBe sure to activate the Cloud Spanner API on the Developer's Console to\nuse Cloud Spanner from your project.
See the [Cloud Spanner client library docs][javadocs] to learn how to
use this Cloud Spanner Client Library.
@@ -250,13 +242,46 @@ OpenTelemetry openTelemetry = OpenTelemetrySdk.builder()
.build()
SpannerOptions options = SpannerOptions.newBuilder()
-// Inject OpenTelemetry object via Spanner Options or register OpenTelmetry object as Global
+// Inject OpenTelemetry object via Spanner Options or register OpenTelemetry object as Global
.setOpenTelemetry(openTelemetry)
.build();
Spanner spanner = options.getService();
```
+#### OpenTelemetry SQL Statement Tracing
+The OpenTelemetry traces that are generated by the Java client include any request and transaction
+tags that have been set. The traces can also include the SQL statements that are executed and the
+name of the thread that executes the statement. Enable this with the `enableExtendedTracing`
+option:
+
+```
+SpannerOptions options = SpannerOptions.newBuilder()
+ .setOpenTelemetry(openTelemetry)
+ .setEnableExtendedTracing(true)
+ .build();
+```
+
+This option can also be enabled by setting the environment variable
+`SPANNER_ENABLE_EXTENDED_TRACING=true`.
+
+#### OpenTelemetry API Tracing
+You can enable tracing of each API call that the Spanner client executes with the `enableApiTracing`
+option. These traces also include any retry attempts for an API call:
+
+```
+SpannerOptions options = SpannerOptions.newBuilder()
+.setOpenTelemetry(openTelemetry)
+.setEnableApiTracing(true)
+.build();
+```
+
+This option can also be enabled by setting the environment variable
+`SPANNER_ENABLE_API_TRACING=true`.
+
+> Note: The attribute keys that are used for additional information about retry attempts and the number of requests might change in a future release.
+
+
### Instrument with OpenCensus
> Note: OpenCensus project is deprecated. See [Sunsetting OpenCensus](https://opentelemetry.io/blog/2023/sunsetting-opencensus/).
@@ -390,6 +415,38 @@ SpannerOptions options = SpannerOptions.newBuilder()
Spanner spanner = options.getService();
```
+#### OpenTelemetry SQL Statement Tracing
+The OpenTelemetry traces that are generated by the Java client include any request and transaction
+tags that have been set. The traces can also include the SQL statements that are executed and the
+name of the thread that executes the statement. Enable this with the `enableExtendedTracing`
+option:
+
+```
+SpannerOptions options = SpannerOptions.newBuilder()
+ .setOpenTelemetry(openTelemetry)
+ .setEnableExtendedTracing(true)
+ .build();
+```
+
+This option can also be enabled by setting the environment variable
+`SPANNER_ENABLE_EXTENDED_TRACING=true`.
+
+#### OpenTelemetry API Tracing
+You can enable tracing of each API call that the Spanner client executes with the `enableApiTracing`
+option. These traces also include any retry attempts for an API call:
+
+```
+SpannerOptions options = SpannerOptions.newBuilder()
+.setOpenTelemetry(openTelemetry)
+.setEnableApiTracing(true)
+.build();
+```
+
+This option can also be enabled by setting the environment variable
+`SPANNER_ENABLE_API_TRACING=true`.
+
+> Note: The attribute keys that are used for additional information about retry attempts and the number of requests might change in a future release.
+
## Migrate from OpenCensus to OpenTelemetry
> Using the [OpenTelemetry OpenCensus Bridge](https://mvnrepository.com/artifact/io.opentelemetry/opentelemetry-opencensus-shim), you can immediately begin exporting your metrics and traces with OpenTelemetry
@@ -429,13 +486,11 @@ Samples are in the [`samples/`](https://github.com/googleapis/java-spanner/tree/
| Sample | Source Code | Try it |
| --------------------------- | --------------------------------- | ------ |
-| Database Operations | [source code](https://github.com/googleapis/java-spanner/blob/main/samples/native-image/src/main/java/com/example/spanner/DatabaseOperations.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-spanner&page=editor&open_in_editor=samples/native-image/src/main/java/com/example/spanner/DatabaseOperations.java) |
-| Instance Operations | [source code](https://github.com/googleapis/java-spanner/blob/main/samples/native-image/src/main/java/com/example/spanner/InstanceOperations.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-spanner&page=editor&open_in_editor=samples/native-image/src/main/java/com/example/spanner/InstanceOperations.java) |
-| Native Image Spanner Sample | [source code](https://github.com/googleapis/java-spanner/blob/main/samples/native-image/src/main/java/com/example/spanner/NativeImageSpannerSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-spanner&page=editor&open_in_editor=samples/native-image/src/main/java/com/example/spanner/NativeImageSpannerSample.java) |
| Add And Drop Database Role | [source code](https://github.com/googleapis/java-spanner/blob/main/samples/snippets/src/main/java/com/example/spanner/AddAndDropDatabaseRole.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-spanner&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/spanner/AddAndDropDatabaseRole.java) |
| Add Json Column Sample | [source code](https://github.com/googleapis/java-spanner/blob/main/samples/snippets/src/main/java/com/example/spanner/AddJsonColumnSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-spanner&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/spanner/AddJsonColumnSample.java) |
| Add Jsonb Column Sample | [source code](https://github.com/googleapis/java-spanner/blob/main/samples/snippets/src/main/java/com/example/spanner/AddJsonbColumnSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-spanner&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/spanner/AddJsonbColumnSample.java) |
| Add Numeric Column Sample | [source code](https://github.com/googleapis/java-spanner/blob/main/samples/snippets/src/main/java/com/example/spanner/AddNumericColumnSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-spanner&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/spanner/AddNumericColumnSample.java) |
+| Add Proto Column Sample | [source code](https://github.com/googleapis/java-spanner/blob/main/samples/snippets/src/main/java/com/example/spanner/AddProtoColumnSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-spanner&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/spanner/AddProtoColumnSample.java) |
| Alter Sequence Sample | [source code](https://github.com/googleapis/java-spanner/blob/main/samples/snippets/src/main/java/com/example/spanner/AlterSequenceSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-spanner&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/spanner/AlterSequenceSample.java) |
| Alter Table With Foreign Key Delete Cascade Sample | [source code](https://github.com/googleapis/java-spanner/blob/main/samples/snippets/src/main/java/com/example/spanner/AlterTableWithForeignKeyDeleteCascadeSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-spanner&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/spanner/AlterTableWithForeignKeyDeleteCascadeSample.java) |
| Async Dml Example | [source code](https://github.com/googleapis/java-spanner/blob/main/samples/snippets/src/main/java/com/example/spanner/AsyncDmlExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-spanner&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/spanner/AsyncDmlExample.java) |
@@ -454,23 +509,29 @@ Samples are in the [`samples/`](https://github.com/googleapis/java-spanner/tree/
| Create Database With Default Leader Sample | [source code](https://github.com/googleapis/java-spanner/blob/main/samples/snippets/src/main/java/com/example/spanner/CreateDatabaseWithDefaultLeaderSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-spanner&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/spanner/CreateDatabaseWithDefaultLeaderSample.java) |
| Create Database With Encryption Key | [source code](https://github.com/googleapis/java-spanner/blob/main/samples/snippets/src/main/java/com/example/spanner/CreateDatabaseWithEncryptionKey.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-spanner&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/spanner/CreateDatabaseWithEncryptionKey.java) |
| Create Database With Version Retention Period Sample | [source code](https://github.com/googleapis/java-spanner/blob/main/samples/snippets/src/main/java/com/example/spanner/CreateDatabaseWithVersionRetentionPeriodSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-spanner&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/spanner/CreateDatabaseWithVersionRetentionPeriodSample.java) |
+| Create Full Backup Schedule Sample | [source code](https://github.com/googleapis/java-spanner/blob/main/samples/snippets/src/main/java/com/example/spanner/CreateFullBackupScheduleSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-spanner&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/spanner/CreateFullBackupScheduleSample.java) |
+| Create Incremental Backup Schedule Sample | [source code](https://github.com/googleapis/java-spanner/blob/main/samples/snippets/src/main/java/com/example/spanner/CreateIncrementalBackupScheduleSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-spanner&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/spanner/CreateIncrementalBackupScheduleSample.java) |
| Create Instance Config Sample | [source code](https://github.com/googleapis/java-spanner/blob/main/samples/snippets/src/main/java/com/example/spanner/CreateInstanceConfigSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-spanner&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/spanner/CreateInstanceConfigSample.java) |
| Create Instance Example | [source code](https://github.com/googleapis/java-spanner/blob/main/samples/snippets/src/main/java/com/example/spanner/CreateInstanceExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-spanner&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/spanner/CreateInstanceExample.java) |
+| Create Instance Partition Sample | [source code](https://github.com/googleapis/java-spanner/blob/main/samples/snippets/src/main/java/com/example/spanner/CreateInstancePartitionSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-spanner&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/spanner/CreateInstancePartitionSample.java) |
| Create Instance With Autoscaling Config Example | [source code](https://github.com/googleapis/java-spanner/blob/main/samples/snippets/src/main/java/com/example/spanner/CreateInstanceWithAutoscalingConfigExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-spanner&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/spanner/CreateInstanceWithAutoscalingConfigExample.java) |
| Create Instance With Processing Units Example | [source code](https://github.com/googleapis/java-spanner/blob/main/samples/snippets/src/main/java/com/example/spanner/CreateInstanceWithProcessingUnitsExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-spanner&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/spanner/CreateInstanceWithProcessingUnitsExample.java) |
| Create Sequence Sample | [source code](https://github.com/googleapis/java-spanner/blob/main/samples/snippets/src/main/java/com/example/spanner/CreateSequenceSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-spanner&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/spanner/CreateSequenceSample.java) |
| Create Table With Foreign Key Delete Cascade Sample | [source code](https://github.com/googleapis/java-spanner/blob/main/samples/snippets/src/main/java/com/example/spanner/CreateTableWithForeignKeyDeleteCascadeSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-spanner&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/spanner/CreateTableWithForeignKeyDeleteCascadeSample.java) |
| Custom Timeout And Retry Settings Example | [source code](https://github.com/googleapis/java-spanner/blob/main/samples/snippets/src/main/java/com/example/spanner/CustomTimeoutAndRetrySettingsExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-spanner&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/spanner/CustomTimeoutAndRetrySettingsExample.java) |
+| Delete Backup Schedule Sample | [source code](https://github.com/googleapis/java-spanner/blob/main/samples/snippets/src/main/java/com/example/spanner/DeleteBackupScheduleSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-spanner&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/spanner/DeleteBackupScheduleSample.java) |
| Delete Instance Config Sample | [source code](https://github.com/googleapis/java-spanner/blob/main/samples/snippets/src/main/java/com/example/spanner/DeleteInstanceConfigSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-spanner&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/spanner/DeleteInstanceConfigSample.java) |
| Delete Using Dml Returning Sample | [source code](https://github.com/googleapis/java-spanner/blob/main/samples/snippets/src/main/java/com/example/spanner/DeleteUsingDmlReturningSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-spanner&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/spanner/DeleteUsingDmlReturningSample.java) |
| Directed Read Sample | [source code](https://github.com/googleapis/java-spanner/blob/main/samples/snippets/src/main/java/com/example/spanner/DirectedReadSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-spanner&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/spanner/DirectedReadSample.java) |
| Drop Foreign Key Constraint Delete Cascade Sample | [source code](https://github.com/googleapis/java-spanner/blob/main/samples/snippets/src/main/java/com/example/spanner/DropForeignKeyConstraintDeleteCascadeSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-spanner&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/spanner/DropForeignKeyConstraintDeleteCascadeSample.java) |
| Drop Sequence Sample | [source code](https://github.com/googleapis/java-spanner/blob/main/samples/snippets/src/main/java/com/example/spanner/DropSequenceSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-spanner&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/spanner/DropSequenceSample.java) |
| Enable Fine Grained Access | [source code](https://github.com/googleapis/java-spanner/blob/main/samples/snippets/src/main/java/com/example/spanner/EnableFineGrainedAccess.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-spanner&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/spanner/EnableFineGrainedAccess.java) |
+| Get Backup Schedule Sample | [source code](https://github.com/googleapis/java-spanner/blob/main/samples/snippets/src/main/java/com/example/spanner/GetBackupScheduleSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-spanner&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/spanner/GetBackupScheduleSample.java) |
| Get Commit Stats Sample | [source code](https://github.com/googleapis/java-spanner/blob/main/samples/snippets/src/main/java/com/example/spanner/GetCommitStatsSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-spanner&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/spanner/GetCommitStatsSample.java) |
| Get Database Ddl Sample | [source code](https://github.com/googleapis/java-spanner/blob/main/samples/snippets/src/main/java/com/example/spanner/GetDatabaseDdlSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-spanner&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/spanner/GetDatabaseDdlSample.java) |
| Get Instance Config Sample | [source code](https://github.com/googleapis/java-spanner/blob/main/samples/snippets/src/main/java/com/example/spanner/GetInstanceConfigSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-spanner&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/spanner/GetInstanceConfigSample.java) |
| Insert Using Dml Returning Sample | [source code](https://github.com/googleapis/java-spanner/blob/main/samples/snippets/src/main/java/com/example/spanner/InsertUsingDmlReturningSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-spanner&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/spanner/InsertUsingDmlReturningSample.java) |
+| List Backup Schedules Sample | [source code](https://github.com/googleapis/java-spanner/blob/main/samples/snippets/src/main/java/com/example/spanner/ListBackupSchedulesSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-spanner&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/spanner/ListBackupSchedulesSample.java) |
| List Database Roles | [source code](https://github.com/googleapis/java-spanner/blob/main/samples/snippets/src/main/java/com/example/spanner/ListDatabaseRoles.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-spanner&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/spanner/ListDatabaseRoles.java) |
| List Databases Sample | [source code](https://github.com/googleapis/java-spanner/blob/main/samples/snippets/src/main/java/com/example/spanner/ListDatabasesSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-spanner&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/spanner/ListDatabasesSample.java) |
| List Instance Config Operations Sample | [source code](https://github.com/googleapis/java-spanner/blob/main/samples/snippets/src/main/java/com/example/spanner/ListInstanceConfigOperationsSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-spanner&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/spanner/ListInstanceConfigOperationsSample.java) |
@@ -494,21 +555,28 @@ Samples are in the [`samples/`](https://github.com/googleapis/java-spanner/tree/
| Query With Json Parameter Sample | [source code](https://github.com/googleapis/java-spanner/blob/main/samples/snippets/src/main/java/com/example/spanner/QueryWithJsonParameterSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-spanner&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/spanner/QueryWithJsonParameterSample.java) |
| Query With Jsonb Parameter Sample | [source code](https://github.com/googleapis/java-spanner/blob/main/samples/snippets/src/main/java/com/example/spanner/QueryWithJsonbParameterSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-spanner&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/spanner/QueryWithJsonbParameterSample.java) |
| Query With Numeric Parameter Sample | [source code](https://github.com/googleapis/java-spanner/blob/main/samples/snippets/src/main/java/com/example/spanner/QueryWithNumericParameterSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-spanner&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/spanner/QueryWithNumericParameterSample.java) |
+| Query With Proto Parameter Sample | [source code](https://github.com/googleapis/java-spanner/blob/main/samples/snippets/src/main/java/com/example/spanner/QueryWithProtoParameterSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-spanner&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/spanner/QueryWithProtoParameterSample.java) |
| Quickstart Sample | [source code](https://github.com/googleapis/java-spanner/blob/main/samples/snippets/src/main/java/com/example/spanner/QuickstartSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-spanner&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/spanner/QuickstartSample.java) |
| Read Data With Database Role | [source code](https://github.com/googleapis/java-spanner/blob/main/samples/snippets/src/main/java/com/example/spanner/ReadDataWithDatabaseRole.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-spanner&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/spanner/ReadDataWithDatabaseRole.java) |
| Restore Backup With Encryption Key | [source code](https://github.com/googleapis/java-spanner/blob/main/samples/snippets/src/main/java/com/example/spanner/RestoreBackupWithEncryptionKey.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-spanner&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/spanner/RestoreBackupWithEncryptionKey.java) |
| Set Max Commit Delay Sample | [source code](https://github.com/googleapis/java-spanner/blob/main/samples/snippets/src/main/java/com/example/spanner/SetMaxCommitDelaySample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-spanner&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/spanner/SetMaxCommitDelaySample.java) |
+| Singer Proto | [source code](https://github.com/googleapis/java-spanner/blob/main/samples/snippets/src/main/java/com/example/spanner/SingerProto.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-spanner&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/spanner/SingerProto.java) |
+| Spanner Graph Sample | [source code](https://github.com/googleapis/java-spanner/blob/main/samples/snippets/src/main/java/com/example/spanner/SpannerGraphSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-spanner&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/spanner/SpannerGraphSample.java) |
| Spanner Sample | [source code](https://github.com/googleapis/java-spanner/blob/main/samples/snippets/src/main/java/com/example/spanner/SpannerSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-spanner&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/spanner/SpannerSample.java) |
| Statement Timeout Example | [source code](https://github.com/googleapis/java-spanner/blob/main/samples/snippets/src/main/java/com/example/spanner/StatementTimeoutExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-spanner&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/spanner/StatementTimeoutExample.java) |
| Tag Sample | [source code](https://github.com/googleapis/java-spanner/blob/main/samples/snippets/src/main/java/com/example/spanner/TagSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-spanner&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/spanner/TagSample.java) |
| Tracing Sample | [source code](https://github.com/googleapis/java-spanner/blob/main/samples/snippets/src/main/java/com/example/spanner/TracingSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-spanner&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/spanner/TracingSample.java) |
| Transaction Timeout Example | [source code](https://github.com/googleapis/java-spanner/blob/main/samples/snippets/src/main/java/com/example/spanner/TransactionTimeoutExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-spanner&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/spanner/TransactionTimeoutExample.java) |
+| Update Backup Schedule Sample | [source code](https://github.com/googleapis/java-spanner/blob/main/samples/snippets/src/main/java/com/example/spanner/UpdateBackupScheduleSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-spanner&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/spanner/UpdateBackupScheduleSample.java) |
| Update Database Sample | [source code](https://github.com/googleapis/java-spanner/blob/main/samples/snippets/src/main/java/com/example/spanner/UpdateDatabaseSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-spanner&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/spanner/UpdateDatabaseSample.java) |
| Update Database With Default Leader Sample | [source code](https://github.com/googleapis/java-spanner/blob/main/samples/snippets/src/main/java/com/example/spanner/UpdateDatabaseWithDefaultLeaderSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-spanner&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/spanner/UpdateDatabaseWithDefaultLeaderSample.java) |
| Update Instance Config Sample | [source code](https://github.com/googleapis/java-spanner/blob/main/samples/snippets/src/main/java/com/example/spanner/UpdateInstanceConfigSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-spanner&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/spanner/UpdateInstanceConfigSample.java) |
+| Update Instance Example | [source code](https://github.com/googleapis/java-spanner/blob/main/samples/snippets/src/main/java/com/example/spanner/UpdateInstanceExample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-spanner&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/spanner/UpdateInstanceExample.java) |
| Update Json Data Sample | [source code](https://github.com/googleapis/java-spanner/blob/main/samples/snippets/src/main/java/com/example/spanner/UpdateJsonDataSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-spanner&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/spanner/UpdateJsonDataSample.java) |
| Update Jsonb Data Sample | [source code](https://github.com/googleapis/java-spanner/blob/main/samples/snippets/src/main/java/com/example/spanner/UpdateJsonbDataSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-spanner&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/spanner/UpdateJsonbDataSample.java) |
| Update Numeric Data Sample | [source code](https://github.com/googleapis/java-spanner/blob/main/samples/snippets/src/main/java/com/example/spanner/UpdateNumericDataSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-spanner&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/spanner/UpdateNumericDataSample.java) |
+| Update Proto Data Sample | [source code](https://github.com/googleapis/java-spanner/blob/main/samples/snippets/src/main/java/com/example/spanner/UpdateProtoDataSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-spanner&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/spanner/UpdateProtoDataSample.java) |
+| Update Proto Data Sample Using Dml | [source code](https://github.com/googleapis/java-spanner/blob/main/samples/snippets/src/main/java/com/example/spanner/UpdateProtoDataSampleUsingDml.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-spanner&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/spanner/UpdateProtoDataSampleUsingDml.java) |
| Update Using Dml Returning Sample | [source code](https://github.com/googleapis/java-spanner/blob/main/samples/snippets/src/main/java/com/example/spanner/UpdateUsingDmlReturningSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-spanner&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/spanner/UpdateUsingDmlReturningSample.java) |
| Add And Drop Database Role | [source code](https://github.com/googleapis/java-spanner/blob/main/samples/snippets/src/main/java/com/example/spanner/admin/archived/AddAndDropDatabaseRole.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-spanner&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/spanner/admin/archived/AddAndDropDatabaseRole.java) |
| Add Json Column Sample | [source code](https://github.com/googleapis/java-spanner/blob/main/samples/snippets/src/main/java/com/example/spanner/admin/archived/AddJsonColumnSample.java) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/java-spanner&page=editor&open_in_editor=samples/snippets/src/main/java/com/example/spanner/admin/archived/AddJsonColumnSample.java) |
@@ -651,7 +719,7 @@ Java is a registered trademark of Oracle and/or its affiliates.
[kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-spanner/java11.html
[stability-image]: https://img.shields.io/badge/stability-stable-green
[maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-spanner.svg
-[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-spanner/6.66.0
+[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-spanner/6.78.0
[authentication]: https://github.com/googleapis/google-cloud-java#authentication
[auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes
[predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles
diff --git a/benchmarks/pom.xml b/benchmarks/pom.xml
index b6883cb775c..1ab983259a7 100644
--- a/benchmarks/pom.xml
+++ b/benchmarks/pom.xml
@@ -24,7 +24,7 @@
com.google.cloudgoogle-cloud-spanner-parent
- 6.66.1-SNAPSHOT
+ 6.78.1-SNAPSHOT
@@ -33,8 +33,8 @@
1.8UTF-8UTF-8
- 2.9.1
- 1.36.0
+ 2.10.1
+ 1.42.1
@@ -49,12 +49,12 @@
com.google.cloud.opentelemetryexporter-trace
- 0.25.2
+ 0.33.0com.google.cloud.opentelemetryexporter-metrics
- 0.25.2
+ 0.33.0
@@ -85,24 +85,24 @@
io.opentelemetryopentelemetry-bom
- 1.37.0
+ 1.42.1pomimportcom.google.cloudgoogle-cloud-spanner
- 6.66.0
+ 6.76.0commons-clicommons-cli
- 1.6.0
+ 1.9.0com.google.auto.valueauto-value-annotations
- 1.10.4
+ 1.11.0com.kohlschutter.junixsocket
@@ -118,7 +118,7 @@
commons-clicommons-cli
- 1.7.0
+ 1.9.0
@@ -133,7 +133,7 @@
org.codehaus.mojoexec-maven-plugin
- 3.2.0
+ 3.4.1com.google.cloud.spanner.benchmark.LatencyBenchmarkfalse
diff --git a/generation_config.yaml b/generation_config.yaml
new file mode 100644
index 00000000000..54b3a1cff92
--- /dev/null
+++ b/generation_config.yaml
@@ -0,0 +1,28 @@
+gapic_generator_version: 2.47.0
+googleapis_commitish: de509e38d37a2a9d8b95e1ce78831189f4f3c0f4
+libraries_bom_version: 26.48.0
+libraries:
+ - api_shortname: spanner
+ name_pretty: Cloud Spanner
+ product_documentation: https://cloud.google.com/spanner/docs/
+ client_documentation: https://cloud.google.com/java/docs/reference/google-cloud-spanner/latest/history
+ api_description: is a fully managed, mission-critical, relational database service that offers transactional consistency at global scale, \nschemas, SQL (ANSI 2011 with extensions), and automatic, synchronous replication \nfor high availability.\n\nBe sure to activate the Cloud Spanner API on the Developer's Console to\nuse Cloud Spanner from your project.
+ issue_tracker: https://issuetracker.google.com/issues?q=componentid:190851%2B%20status:open
+ release_level: stable
+ language: java
+ min_java_version: 8
+ repo: googleapis/java-spanner
+ repo_short: java-spanner
+ distribution_name: com.google.cloud:google-cloud-spanner
+ api_id: spanner.googleapis.com
+ transport: grpc
+ requires_billing: true
+ codeowner_team: '@googleapis/api-spanner-java'
+ library_type: GAPIC_COMBO
+ excluded_poms: google-cloud-spanner-bom
+ recommended_package: com.google.cloud.spanner
+ GAPICs:
+ - proto_path: google/spanner/admin/database/v1
+ - proto_path: google/spanner/admin/instance/v1
+ - proto_path: google/spanner/executor/v1
+ - proto_path: google/spanner/v1
diff --git a/google-cloud-spanner-bom/pom.xml b/google-cloud-spanner-bom/pom.xml
index da3025651a4..40894e1919b 100644
--- a/google-cloud-spanner-bom/pom.xml
+++ b/google-cloud-spanner-bom/pom.xml
@@ -3,12 +3,12 @@
4.0.0com.google.cloudgoogle-cloud-spanner-bom
- 6.66.1-SNAPSHOT
+ 6.78.1-SNAPSHOTpomcom.google.cloudsdk-platform-java-config
- 3.30.0
+ 3.37.0Google Cloud Spanner BOM
@@ -53,43 +53,43 @@
com.google.cloudgoogle-cloud-spanner
- 6.66.1-SNAPSHOT
+ 6.78.1-SNAPSHOTcom.google.cloudgoogle-cloud-spannertest-jar
- 6.66.1-SNAPSHOT
+ 6.78.1-SNAPSHOTcom.google.api.grpcgrpc-google-cloud-spanner-v1
- 6.66.1-SNAPSHOT
+ 6.78.1-SNAPSHOTcom.google.api.grpcgrpc-google-cloud-spanner-admin-instance-v1
- 6.66.1-SNAPSHOT
+ 6.78.1-SNAPSHOTcom.google.api.grpcgrpc-google-cloud-spanner-admin-database-v1
- 6.66.1-SNAPSHOT
+ 6.78.1-SNAPSHOTcom.google.api.grpcproto-google-cloud-spanner-admin-instance-v1
- 6.66.1-SNAPSHOT
+ 6.78.1-SNAPSHOTcom.google.api.grpcproto-google-cloud-spanner-v1
- 6.66.1-SNAPSHOT
+ 6.78.1-SNAPSHOTcom.google.api.grpcproto-google-cloud-spanner-admin-database-v1
- 6.66.1-SNAPSHOT
+ 6.78.1-SNAPSHOT
diff --git a/google-cloud-spanner-executor/assembly-descriptor.xml b/google-cloud-spanner-executor/assembly-descriptor.xml
deleted file mode 100644
index 8a9e7f8f500..00000000000
--- a/google-cloud-spanner-executor/assembly-descriptor.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-
- jar-with-dependencies
-
- jar
-
- false
-
-
- /
- false
- true
-
-
- io.grpc.LoadBalancerProvider
-
-
-
-
-
-
- ${project.build.outputDirectory}
- .
-
-
-
diff --git a/google-cloud-spanner-executor/pom.xml b/google-cloud-spanner-executor/pom.xml
index c56d3a375fa..73b9a329389 100644
--- a/google-cloud-spanner-executor/pom.xml
+++ b/google-cloud-spanner-executor/pom.xml
@@ -5,14 +5,14 @@
4.0.0com.google.cloudgoogle-cloud-spanner-executor
- 6.66.1-SNAPSHOT
+ 6.78.1-SNAPSHOTjarGoogle Cloud Spanner Executorcom.google.cloudgoogle-cloud-spanner-parent
- 6.66.1-SNAPSHOT
+ 6.78.1-SNAPSHOT
@@ -129,12 +129,12 @@
commons-clicommons-cli
- 1.7.0
+ 1.9.0commons-iocommons-io
- 2.16.1
+ 2.17.0
@@ -160,35 +160,66 @@
- google-spanner-cloud-executor
- maven-assembly-plugin
- 3.7.1
+ maven-resources-plugin
+
+
+ copy-resources
+ validate
+
+ copy-resources
+
+
+ ${project.build.directory}/spanner-executor
+
+
+ resources
+ true
+
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-dependency-plugin
+
+
+ copy-dependencies
+ prepare-package
+
+ copy-dependencies
+
+
+ ${project.build.directory}/spanner-executor/lib
+ false
+ false
+ true
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-jar-plugin
-
- assembly-descriptor.xml
-
+ spanner-executor/google-spanner-cloud-executor
+ falsecom.google.cloud.executor.spanner.WorkerProxy
+ true
+ lib/
-
-
- make-assembly
- package
-
- single
-
-
- org.apache.maven.pluginsmaven-failsafe-plugin
- 3.2.5
+ 3.5.0
diff --git a/google-cloud-spanner-executor/src/main/java/com/google/cloud/executor/spanner/CloudClientExecutor.java b/google-cloud-spanner-executor/src/main/java/com/google/cloud/executor/spanner/CloudClientExecutor.java
index 6d8ef262454..d180f55d06a 100644
--- a/google-cloud-spanner-executor/src/main/java/com/google/cloud/executor/spanner/CloudClientExecutor.java
+++ b/google-cloud-spanner-executor/src/main/java/com/google/cloud/executor/spanner/CloudClientExecutor.java
@@ -75,6 +75,7 @@
import com.google.cloud.spanner.encryption.CustomerManagedEncryption;
import com.google.cloud.spanner.v1.stub.SpannerStubSettings;
import com.google.common.base.Function;
+import com.google.common.base.Joiner;
import com.google.common.base.Preconditions;
import com.google.common.collect.Lists;
import com.google.common.util.concurrent.ThreadFactoryBuilder;
@@ -191,6 +192,16 @@ public CloudClientExecutor(boolean enableGrpcFaultInjector) {
this.enableGrpcFaultInjector = enableGrpcFaultInjector;
}
+ // Helper for unexpected results.
+ public static String unexpectedExceptionResponse(Exception e) {
+ return "Unexpected error in Github Cloud Java Client Executor: "
+ + e
+ + " Msg: "
+ + e.getMessage()
+ + " Stack: "
+ + Joiner.on("\n").join(e.getStackTrace());
+ }
+
/**
* Implementation of a ReadWriteTransaction, which is a wrapper of the cloud TransactionRunner. It
* stores all the status and related variables from the start to finish, and control the running
@@ -792,10 +803,13 @@ private synchronized Spanner getClient(long timeoutSeconds, boolean useMultiplex
.setTotalTimeout(rpcTimeout)
.build();
- com.google.cloud.spanner.SessionPoolOptions sessionPoolOptions =
- SessionPoolOptionsHelper.setUseMultiplexedSession(
- com.google.cloud.spanner.SessionPoolOptions.newBuilder(), useMultiplexedSession)
- .build();
+ com.google.cloud.spanner.SessionPoolOptions.Builder poolOptionsBuilder =
+ com.google.cloud.spanner.SessionPoolOptions.newBuilder();
+ SessionPoolOptionsHelper.setUseMultiplexedSession(
+ com.google.cloud.spanner.SessionPoolOptions.newBuilder(), useMultiplexedSession);
+ SessionPoolOptionsHelper.setUseMultiplexedSessionBlindWrite(
+ com.google.cloud.spanner.SessionPoolOptions.newBuilder(), useMultiplexedSession);
+ com.google.cloud.spanner.SessionPoolOptions sessionPoolOptions = poolOptionsBuilder.build();
// Cloud Spanner Client does not support global retry settings,
// Thus, we need to add retry settings to each individual stub.
SpannerOptions.Builder optionsBuilder =
@@ -1083,7 +1097,7 @@ private Status executeCreateCloudInstance(
return sender.finishWithError(
toStatus(
SpannerExceptionFactory.newSpannerException(
- ErrorCode.INVALID_ARGUMENT, "Unexpected error: " + e.getMessage())));
+ ErrorCode.INVALID_ARGUMENT, CloudClientExecutor.unexpectedExceptionResponse(e))));
}
return sender.finishWithOK();
}
@@ -2665,6 +2679,7 @@ private Status processResults(
executionContext.finishRead(Status.OK);
return sender.finishWithOK();
} catch (SpannerException e) {
+ LOGGER.log(Level.WARNING, "Encountered exception: ", e);
Status status = toStatus(e);
LOGGER.log(
Level.WARNING,
diff --git a/google-cloud-spanner-executor/src/main/java/com/google/cloud/executor/spanner/CloudExecutor.java b/google-cloud-spanner-executor/src/main/java/com/google/cloud/executor/spanner/CloudExecutor.java
index cda9923f392..537a6ed4c33 100644
--- a/google-cloud-spanner-executor/src/main/java/com/google/cloud/executor/spanner/CloudExecutor.java
+++ b/google-cloud-spanner-executor/src/main/java/com/google/cloud/executor/spanner/CloudExecutor.java
@@ -416,39 +416,48 @@ public Status sendOutcome(SpannerActionOutcome outcome) {
/** Map Cloud ErrorCode to Status. */
protected Status toStatus(SpannerException e) {
+ String errorMessage = e.getMessage();
+ com.google.rpc.Status rpcStatus = io.grpc.protobuf.StatusProto.fromThrowable(e);
+ if (rpcStatus != null) {
+ if (rpcStatus.getDetailsCount() > 0) {
+ errorMessage += "/n";
+ }
+ for (int i = 0; i < rpcStatus.getDetailsCount(); i++) {
+ errorMessage += "\nError detail: " + rpcStatus.getDetails(i).toString();
+ }
+ }
switch (e.getErrorCode()) {
case INVALID_ARGUMENT:
- return Status.fromCode(Status.INVALID_ARGUMENT.getCode()).withDescription(e.getMessage());
+ return Status.fromCode(Status.INVALID_ARGUMENT.getCode()).withDescription(errorMessage);
case PERMISSION_DENIED:
- return Status.fromCode(Status.PERMISSION_DENIED.getCode()).withDescription(e.getMessage());
+ return Status.fromCode(Status.PERMISSION_DENIED.getCode()).withDescription(errorMessage);
case ABORTED:
- return Status.fromCode(Status.ABORTED.getCode()).withDescription(e.getMessage());
+ return Status.fromCode(Status.ABORTED.getCode()).withDescription(errorMessage);
case ALREADY_EXISTS:
- return Status.fromCode(Status.ALREADY_EXISTS.getCode()).withDescription(e.getMessage());
+ return Status.fromCode(Status.ALREADY_EXISTS.getCode()).withDescription(errorMessage);
case CANCELLED:
- return Status.fromCode(Status.CANCELLED.getCode()).withDescription(e.getMessage());
+ return Status.fromCode(Status.CANCELLED.getCode()).withDescription(errorMessage);
case INTERNAL:
return Status.fromCode(Status.INTERNAL.getCode())
- .withDescription(e.getMessage() + e.getReason() == null ? "" : ": " + e.getReason());
+ .withDescription(errorMessage + e.getReason() == null ? "" : ": " + e.getReason());
case FAILED_PRECONDITION:
- return Status.fromCode(Status.FAILED_PRECONDITION.getCode())
- .withDescription(e.getMessage());
+ return Status.fromCode(Status.FAILED_PRECONDITION.getCode()).withDescription(errorMessage);
case NOT_FOUND:
- return Status.fromCode(Status.NOT_FOUND.getCode()).withDescription(e.getMessage());
+ return Status.fromCode(Status.NOT_FOUND.getCode()).withDescription(errorMessage);
case DEADLINE_EXCEEDED:
- return Status.fromCode(Status.DEADLINE_EXCEEDED.getCode()).withDescription(e.getMessage());
+ return Status.fromCode(Status.DEADLINE_EXCEEDED.getCode()).withDescription(errorMessage);
case RESOURCE_EXHAUSTED:
- return Status.fromCode(Status.RESOURCE_EXHAUSTED.getCode()).withDescription(e.getMessage());
+ return Status.fromCode(Status.RESOURCE_EXHAUSTED.getCode()).withDescription(errorMessage);
case OUT_OF_RANGE:
- return Status.fromCode(Status.OUT_OF_RANGE.getCode()).withDescription(e.getMessage());
+ return Status.fromCode(Status.OUT_OF_RANGE.getCode()).withDescription(errorMessage);
case UNAUTHENTICATED:
- return Status.fromCode(Status.UNAUTHENTICATED.getCode()).withDescription(e.getMessage());
+ return Status.fromCode(Status.UNAUTHENTICATED.getCode()).withDescription(errorMessage);
case UNIMPLEMENTED:
- return Status.fromCode(Status.UNIMPLEMENTED.getCode()).withDescription(e.getMessage());
+ return Status.fromCode(Status.UNIMPLEMENTED.getCode()).withDescription(errorMessage);
case UNAVAILABLE:
- return Status.fromCode(Status.UNAVAILABLE.getCode()).withDescription(e.getMessage());
+ return Status.fromCode(Status.UNAVAILABLE.getCode()).withDescription(errorMessage);
case UNKNOWN:
- return Status.fromCode(Status.UNKNOWN.getCode()).withDescription(e.getMessage());
+ return Status.fromCode(Status.UNKNOWN.getCode()).withDescription(errorMessage);
default:
return Status.fromCode(Status.UNKNOWN.getCode())
.withDescription("Unsupported Spanner error code: " + e.getErrorCode());
diff --git a/google-cloud-spanner-executor/src/main/java/com/google/cloud/spanner/SessionPoolOptionsHelper.java b/google-cloud-spanner-executor/src/main/java/com/google/cloud/spanner/SessionPoolOptionsHelper.java
index 8f978a39a31..dafaa4a1f31 100644
--- a/google-cloud-spanner-executor/src/main/java/com/google/cloud/spanner/SessionPoolOptionsHelper.java
+++ b/google-cloud-spanner-executor/src/main/java/com/google/cloud/spanner/SessionPoolOptionsHelper.java
@@ -30,4 +30,12 @@ public static SessionPoolOptions.Builder setUseMultiplexedSession(
SessionPoolOptions.Builder sessionPoolOptionsBuilder, boolean useMultiplexedSession) {
return sessionPoolOptionsBuilder.setUseMultiplexedSession(useMultiplexedSession);
}
+
+ // TODO: Remove when multiplexed session for blind write is released.
+ public static SessionPoolOptions.Builder setUseMultiplexedSessionBlindWrite(
+ SessionPoolOptions.Builder sessionPoolOptionsBuilder,
+ boolean useMultiplexedSessionBlindWrite) {
+ return sessionPoolOptionsBuilder.setUseMultiplexedSessionBlindWrite(
+ useMultiplexedSessionBlindWrite);
+ }
}
diff --git a/google-cloud-spanner-executor/src/main/java/com/google/cloud/spanner/executor/v1/SpannerExecutorProxySettings.java b/google-cloud-spanner-executor/src/main/java/com/google/cloud/spanner/executor/v1/SpannerExecutorProxySettings.java
index b8b364469fe..f24a2f2bdc3 100644
--- a/google-cloud-spanner-executor/src/main/java/com/google/cloud/spanner/executor/v1/SpannerExecutorProxySettings.java
+++ b/google-cloud-spanner-executor/src/main/java/com/google/cloud/spanner/executor/v1/SpannerExecutorProxySettings.java
@@ -49,7 +49,9 @@
*
The builder of this class is recursive, so contained classes are themselves builders. When
* build() is called, the tree of builders is called to create the complete settings object.
*
- *
For example, to set the total timeout of executeActionAsync to 30 seconds:
+ *
For example, to set the
+ * [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings)
+ * of executeActionAsync:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
@@ -66,11 +68,22 @@
* .executeActionAsyncSettings()
* .getRetrySettings()
* .toBuilder()
- * .setTotalTimeout(Duration.ofSeconds(30))
+ * .setInitialRetryDelayDuration(Duration.ofSeconds(1))
+ * .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
+ * .setMaxAttempts(5)
+ * .setMaxRetryDelayDuration(Duration.ofSeconds(30))
+ * .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
+ * .setRetryDelayMultiplier(1.3)
+ * .setRpcTimeoutMultiplier(1.5)
+ * .setTotalTimeoutDuration(Duration.ofSeconds(300))
* .build());
* SpannerExecutorProxySettings spannerExecutorProxySettings =
* spannerExecutorProxySettingsBuilder.build();
* }
+ *
+ * Please refer to the [Client Side Retry
+ * Guide](https://github.com/googleapis/google-cloud-java/blob/main/docs/client_retries.md) for
+ * additional support in setting retries.
*/
@Generated("by gapic-generator-java")
public class SpannerExecutorProxySettings extends ClientSettings {
diff --git a/google-cloud-spanner-executor/src/main/java/com/google/cloud/spanner/executor/v1/stub/SpannerExecutorProxyStubSettings.java b/google-cloud-spanner-executor/src/main/java/com/google/cloud/spanner/executor/v1/stub/SpannerExecutorProxyStubSettings.java
index 2b8c17ada97..fbcf8bada1f 100644
--- a/google-cloud-spanner-executor/src/main/java/com/google/cloud/spanner/executor/v1/stub/SpannerExecutorProxyStubSettings.java
+++ b/google-cloud-spanner-executor/src/main/java/com/google/cloud/spanner/executor/v1/stub/SpannerExecutorProxyStubSettings.java
@@ -17,6 +17,7 @@
package com.google.cloud.spanner.executor.v1.stub;
import com.google.api.core.ApiFunction;
+import com.google.api.core.ObsoleteApi;
import com.google.api.gax.core.GaxProperties;
import com.google.api.gax.core.GoogleCredentialsProvider;
import com.google.api.gax.core.InstantiatingExecutorProvider;
@@ -57,7 +58,9 @@
*
The builder of this class is recursive, so contained classes are themselves builders. When
* build() is called, the tree of builders is called to create the complete settings object.
*
- *
For example, to set the total timeout of executeActionAsync to 30 seconds:
+ *
For example, to set the
+ * [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings)
+ * of executeActionAsync:
*
*
{@code
* // This snippet has been automatically generated and should be regarded as a code template only.
@@ -74,11 +77,22 @@
* .executeActionAsyncSettings()
* .getRetrySettings()
* .toBuilder()
- * .setTotalTimeout(Duration.ofSeconds(30))
+ * .setInitialRetryDelayDuration(Duration.ofSeconds(1))
+ * .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
+ * .setMaxAttempts(5)
+ * .setMaxRetryDelayDuration(Duration.ofSeconds(30))
+ * .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
+ * .setRetryDelayMultiplier(1.3)
+ * .setRpcTimeoutMultiplier(1.5)
+ * .setTotalTimeoutDuration(Duration.ofSeconds(300))
* .build());
* SpannerExecutorProxyStubSettings spannerExecutorProxySettings =
* spannerExecutorProxySettingsBuilder.build();
* }