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
Conversation
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.
Here is the summary of changes. You are about to add 1 region tag.
This comment is generated by snippet-bot.
|
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 Report
@@ 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
Continue to review full report at Codecov.
|
...ippets/src/main/java/com/example/spanner/CreateDatabaseWithVersionRetentionPeriodSample.java
Show resolved
Hide resolved
...ippets/src/main/java/com/example/spanner/CreateDatabaseWithVersionRetentionPeriodSample.java
Show resolved
Hide resolved
samples/snippets/src/main/java/com/example/spanner/SpannerSample.java
Outdated
Show resolved
Hide resolved
Uses the earliest version time from the database as the version time for the backup.
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. |
* 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.
Do not delete the this branch, it is still referred by the docs. |
* 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
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.