Commit ab14a5e
authored
feat!: Point In Time Recovery (PITR) (#452)
* feat: exposes new pitr-lite database fields
Exposes earliest version time and version retention period fields in the
database class.
* feat: adds it tests for updating version retention
Adds integration tests for updating the version retention period.
* feat: adds new create database tests for pitr
Adds create database tests for PITR and refactors the integration test
class.
* chore: refactors tests
Separates PITR database tests into 2 files for clarity.
* fix: disables pitr-lite tests in emulator
The feature is not supported in the emulator currently.
* fix: closes result set in test
Addresses PR comment.
* fix: updates DatabaseInfo equals/hashcode
To compare version retention period and earliest version time.
* fix: formatting
Fixes formatting of the DatabaseInfo
* feature: adds test for throttled pitr field
Adds test to check for the throttled field in the update database ddl
metadata.
* fix: explain further the pitr-lite params in docs
Adds more explanations to the purpose of the added params for pitr-lite:
version_retention_period and earliest_version_time.
* feat: adds version time to backups
Adds PITR-lite version time to backups. This should make it possible to
specify the consistent time for copying the database.
* test: adds integration tests for pitr backups
* test: adds tests for pitr restore
* test: fixes integration test for pitr restore
* test: fixes backup unit test
* test: fixes npe on pitr backup test
* chore: fixes clirr errors
* chore: refactors / addresses pr comments
* test: fixes the it pitr sad cases tests
* test: fixes pitr backup and restore tests
* test: skips pitr backup and restore tests
This is because the backend for these features is not ready yet.1 parent 44aa384 commit ab14a5e
File tree
17 files changed
+935
-88
lines changed- google-cloud-spanner
- src
- main/java/com/google/cloud/spanner
- testing
- test/java/com/google/cloud/spanner
- it
17 files changed
+935
-88
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
453 | 453 | | |
454 | 454 | | |
455 | 455 | | |
456 | | - | |
| 456 | + | |
457 | 457 | | |
458 | 458 | | |
459 | 459 | | |
| |||
475 | 475 | | |
476 | 476 | | |
477 | 477 | | |
478 | | - | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
479 | 490 | | |
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
68 | | - | |
| 68 | + | |
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
| |||
182 | 182 | | |
183 | 183 | | |
184 | 184 | | |
| 185 | + | |
185 | 186 | | |
186 | 187 | | |
187 | 188 | | |
| |||
Lines changed: 31 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
40 | 41 | | |
41 | 42 | | |
42 | 43 | | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
43 | 55 | | |
44 | 56 | | |
45 | 57 | | |
| |||
55 | 67 | | |
56 | 68 | | |
57 | 69 | | |
| 70 | + | |
58 | 71 | | |
59 | 72 | | |
60 | 73 | | |
| |||
67 | 80 | | |
68 | 81 | | |
69 | 82 | | |
| 83 | + | |
70 | 84 | | |
71 | 85 | | |
72 | 86 | | |
| |||
84 | 98 | | |
85 | 99 | | |
86 | 100 | | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
87 | 107 | | |
88 | 108 | | |
89 | 109 | | |
| |||
119 | 139 | | |
120 | 140 | | |
121 | 141 | | |
| 142 | + | |
122 | 143 | | |
123 | 144 | | |
124 | 145 | | |
| |||
128 | 149 | | |
129 | 150 | | |
130 | 151 | | |
| 152 | + | |
131 | 153 | | |
132 | 154 | | |
133 | 155 | | |
| |||
157 | 179 | | |
158 | 180 | | |
159 | 181 | | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
160 | 187 | | |
161 | 188 | | |
162 | 189 | | |
| |||
180 | 207 | | |
181 | 208 | | |
182 | 209 | | |
| 210 | + | |
183 | 211 | | |
184 | 212 | | |
185 | 213 | | |
186 | 214 | | |
187 | 215 | | |
188 | | - | |
| 216 | + | |
189 | 217 | | |
190 | 218 | | |
191 | 219 | | |
192 | 220 | | |
193 | 221 | | |
194 | | - | |
| 222 | + | |
| 223 | + | |
195 | 224 | | |
196 | 225 | | |
Lines changed: 9 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
| 121 | + | |
121 | 122 | | |
122 | | - | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
123 | 129 | | |
124 | 130 | | |
125 | 131 | | |
| |||
177 | 183 | | |
178 | 184 | | |
179 | 185 | | |
| 186 | + | |
| 187 | + | |
180 | 188 | | |
181 | 189 | | |
182 | 190 | | |
| |||
Lines changed: 26 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
104 | 130 | | |
105 | 131 | | |
106 | 132 | | |
| |||
Lines changed: 23 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
117 | | - | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
118 | 131 | | |
119 | 132 | | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
125 | 140 | | |
126 | | - | |
| 141 | + | |
127 | 142 | | |
128 | 143 | | |
129 | 144 | | |
| |||
137 | 152 | | |
138 | 153 | | |
139 | 154 | | |
| 155 | + | |
140 | 156 | | |
141 | 157 | | |
142 | 158 | | |
| |||
Lines changed: 51 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
33 | 37 | | |
34 | 38 | | |
35 | 39 | | |
| |||
41 | 45 | | |
42 | 46 | | |
43 | 47 | | |
| 48 | + | |
| 49 | + | |
44 | 50 | | |
45 | 51 | | |
46 | 52 | | |
| |||
52 | 58 | | |
53 | 59 | | |
54 | 60 | | |
| 61 | + | |
| 62 | + | |
55 | 63 | | |
56 | 64 | | |
57 | 65 | | |
| |||
73 | 81 | | |
74 | 82 | | |
75 | 83 | | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
76 | 96 | | |
77 | 97 | | |
78 | 98 | | |
| |||
96 | 116 | | |
97 | 117 | | |
98 | 118 | | |
| 119 | + | |
| 120 | + | |
99 | 121 | | |
100 | 122 | | |
101 | 123 | | |
102 | 124 | | |
103 | 125 | | |
104 | 126 | | |
105 | 127 | | |
| 128 | + | |
| 129 | + | |
106 | 130 | | |
107 | 131 | | |
108 | 132 | | |
| |||
111 | 135 | | |
112 | 136 | | |
113 | 137 | | |
| 138 | + | |
| 139 | + | |
114 | 140 | | |
115 | 141 | | |
116 | 142 | | |
| |||
129 | 155 | | |
130 | 156 | | |
131 | 157 | | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
132 | 175 | | |
133 | 176 | | |
134 | 177 | | |
| |||
154 | 197 | | |
155 | 198 | | |
156 | 199 | | |
157 | | - | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
158 | 203 | | |
159 | 204 | | |
160 | 205 | | |
161 | 206 | | |
162 | | - | |
| 207 | + | |
| 208 | + | |
163 | 209 | | |
164 | 210 | | |
165 | 211 | | |
166 | 212 | | |
167 | | - | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
168 | 216 | | |
169 | 217 | | |
0 commit comments