Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: adds samples for PITR #837

Merged
merged 15 commits into from Mar 9, 2021
Merged

feat: adds samples for PITR #837

merged 15 commits into from Mar 9, 2021

Conversation

thiagotnunes
Copy link
Contributor

@thiagotnunes thiagotnunes commented Feb 1, 2021

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 a review from as a code owner Feb 1, 2021
@thiagotnunes thiagotnunes requested a review from Feb 1, 2021
@snippet-bot
Copy link

@snippet-bot snippet-bot bot commented Feb 1, 2021

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 label Feb 1, 2021
@google-cla google-cla bot added the cla: yes label Feb 1, 2021
@product-auto-label product-auto-label bot added the samples label Feb 1, 2021
@thiagotnunes thiagotnunes added the do not merge label Feb 1, 2021
@thiagotnunes thiagotnunes requested a review from olavloite Feb 1, 2021
@thiagotnunes
Copy link
Contributor Author

@thiagotnunes thiagotnunes commented Feb 1, 2021

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
Copy link

@codecov codecov bot commented Feb 1, 2021

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 thiagotnunes requested a review from olavloite Feb 22, 2021
@thiagotnunes
Copy link
Contributor Author

@thiagotnunes thiagotnunes commented Feb 24, 2021

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 label Feb 26, 2021
thiagotnunes added 5 commits Mar 1, 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
18 checks passed
@thiagotnunes thiagotnunes deleted the pitr-samples branch Mar 9, 2021
@thiagotnunes thiagotnunes restored the pitr-samples branch Mar 9, 2021
@thiagotnunes
Copy link
Contributor Author

@thiagotnunes thiagotnunes commented Mar 9, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: spanner cla: yes samples
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants