Conversation

thiagotnunes

Adds sample for creating a database with a version retention period. Updates sample for creating a backup with a version time. Updates sample for restoring a backup, printing the backup version time.

Adds sample for creating a database with a version retention
period. Updates sample for creating a backup with a version time.
Updates sample for restoring a backup, printing the backup version time.
@thiagotnunesthiagotnunes requested a review from a team as a code owner February 1, 2021 00:22
@thiagotnunesthiagotnunes requested a review from a team February 1, 2021 00:22
@snippet-bot

Here is the summary of changes.

You are about to add 1 region tag.

This comment is generated by snippet-bot.
If you find problems with this result, please file an issue at:
https://.com/googleapis/repo-automation-bots/issues.
To update this comment, add snippet-bot:force-run label or use the checkbox below:

  • Refresh this comment

@product-auto-labelproduct-auto-label bot added the api: spannerIssues related to the googleapis/java-spanner API.label Feb 1, 2021
@google-clagoogle-cla bot added the cla: yesThis human has signed the Contributor License Agreement.label Feb 1, 2021
@product-auto-labelproduct-auto-label bot added the samplesIssues that are directly related to samples.label Feb 1, 2021
@thiagotnunesthiagotnunes added the do not mergeIndicates a pull request not ready for merge, due to either quality or timing.label Feb 1, 2021
@thiagotnunes

This should only be merged after we release a client library version with the PITR feature. (Before that we need to rebase over master).

@codecov

Codecov Report

Merging #837 (6de10e4) into master (34c9b8d) will increase coverage by 0.00%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##             master     #837   +/-   ##
=========================================
  Coverage     85.22%   85.22%           
- Complexity     2650     2652    +2     
=========================================
  Files           145      145           
  Lines         14358    14358           
  Branches       1391     1391           
=========================================
+ Hits          12236    12237    +1     
  Misses         1539     1539           
+ Partials        583      582    -1     
Impacted FilesCoverage ΔComplexity Δ
...m/google/cloud/spanner/connection/SpannerPool.java87.36% <0.00%> (-0.53%)33.00% <0.00%> (ø%)
...ud/spanner/SessionPoolAsyncTransactionManager.java87.21% <0.00%> (+1.50%)14.00% <0.00%> (+2.00%)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 34c9b8d...972be53. Read the comment docs.

@thiagotnunesthiagotnunes changed the title feat: adds samples for pitr feat: adds samples for PITR Feb 4, 2021
Uses the earliest version time from the database as the version time for
the backup.
@thiagotnunes

We need to wait for the snippets BOM to be updated to the version that contains the PITR changes (>= 4.0.0) before we can merge this PR.

@thiagotnunesthiagotnunes removed the do not mergeIndicates a pull request not ready for merge, due to either quality or timing.label Feb 26, 2021
* samples: creates a backup using the current time

Instead of using the earliest version time of the database, uses the
current time (from spanner). If we used the earliest version time of the
database instead we would be creating an empty backup, since the
database we are backing up is not 1 hour old (default version retention
period).

* samples: remove unused variable

Clean up create backup samples by removing unused variable.
@thiagotnunesthiagotnunes merged commit 55fa0cc into master Mar 9, 2021
@thiagotnunesthiagotnunes deleted the pitr-samples branch March 9, 2021 04:05
@thiagotnunesthiagotnunes restored the pitr-samples branch March 9, 2021 04:05
@thiagotnunes

Do not delete the this branch, it is still referred by the docs.

ansh0l pushed a commit to ansh0l/java-spanner that referenced this pull request Nov 10, 2022
* chore(ci): replace accidentally removed install steps

* force go version 1.18.3

* fix apidiff target

* try upload/download of baseline

* upload package diff file

* remove diff upload

* add retention-days
Sign up for free to join this conversation on . Already have an account? Sign in to comment
api: spannerIssues related to the googleapis/java-spanner API.cla: yesThis human has signed the Contributor License Agreement.samplesIssues that are directly related to samples.
None yet

Successfully merging this pull request may close these issues.