Skip to content
This repository was archived by the owner on Aug 30, 2026. It is now read-only.

feat: adds samples for PITR - #837

Merged
thiagotnunes merged 15 commits into
masterfrom
pitr-samples
Mar 9, 2021
Merged

thiagotnunes merged 15 commits into
masterfrom
pitr-samples

Conversation

@thiagotnunes

Copy link
Copy Markdown
Contributor

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.
@thiagotnunes
thiagotnunes requested review from a team February 1, 2021 00:22
@snippet-bot

snippet-bot Bot commented Feb 1, 2021 •

Copy link
Copy Markdown

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://github.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-label product-auto-label Bot added the api: spanner Issues related to the googleapis/java-spanner API. label Feb 1, 2021
@google-cla google-cla Bot added the cla: yes This human has signed the Contributor License Agreement. label Feb 1, 2021
@product-auto-label product-auto-label Bot added the samples Issues that are directly related to samples. label Feb 1, 2021
@thiagotnunes thiagotnunes added the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Feb 1, 2021
@thiagotnunes

Copy link
Copy Markdown
Contributor Author

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 Bot commented Feb 1, 2021 •

Copy link
Copy Markdown

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 Files Coverage Δ Complexity Δ
...m/google/cloud/spanner/connection/SpannerPool.java 87.36% <0.00%> (-0.53%) 33.00% <0.00%> (ø%)
...ud/spanner/SessionPoolAsyncTransactionManager.java 87.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.

@thiagotnunes thiagotnunes 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

Copy link
Copy Markdown
Contributor Author

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.

@thiagotnunes thiagotnunes removed the do not merge Indicates 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.
@thiagotnunes
thiagotnunes merged commit 55fa0cc into master Mar 9, 2021
@thiagotnunes
thiagotnunes deleted the pitr-samples branch March 9, 2021 04:05
@thiagotnunes
thiagotnunes restored the pitr-samples branch March 9, 2021 04:05
@thiagotnunes

Copy link
Copy Markdown
Contributor Author

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 subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

api: spanner Issues related to the googleapis/java-spanner API. cla: yes This human has signed the Contributor License Agreement. samples Issues that are directly related to samples.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

⌂ 换网址