Commit d72c2f7
authored
feat: exposes default leader in database, and leader options / replicas in instance config (#1283)
* feat: expose leader options in instance config
Exposes the list of leader options for an instance from an instance
config.
* feat: expose default leader in database
* test: add it test for instance leader options
* test: add it test for database default leader
* feat: create replica info / type model
* feat: expose replicas in instance config
* test: add it test for replicas in instance config
* test: skip leader tests for emulator
* test: skip emulator for instance admin test
Skips leader options / replicas checking related tests for the emulator.
* docs: add link for leader config accepted values
* docs: fix the link for replica infos.
* test: skip / removes leader tests
We decided not to have setting the default leader tests, because it
requires a multi-regional instance. The one we currently have for
running the tests is regional, so the cost of setup would not justify
the testing.
We also skip the get leader options test, since the feature is not
enabled in production yet.1 parent dc736d5 commit d72c2f7
File tree
11 files changed
+561
-37
lines changed- google-cloud-spanner/src
- main/java/com/google/cloud/spanner
- test/java/com/google/cloud/spanner
- it
11 files changed
+561
-37
lines changedLines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
187 | 187 | | |
188 | 188 | | |
189 | 189 | | |
| 190 | + | |
190 | 191 | | |
191 | 192 | | |
192 | 193 | | |
| |||
Lines changed: 37 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
| |||
44 | 45 | | |
45 | 46 | | |
46 | 47 | | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
47 | 57 | | |
48 | 58 | | |
49 | 59 | | |
| |||
58 | 68 | | |
59 | 69 | | |
60 | 70 | | |
| 71 | + | |
61 | 72 | | |
62 | 73 | | |
63 | 74 | | |
| |||
72 | 83 | | |
73 | 84 | | |
74 | 85 | | |
| 86 | + | |
75 | 87 | | |
76 | 88 | | |
77 | 89 | | |
| |||
111 | 123 | | |
112 | 124 | | |
113 | 125 | | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
114 | 132 | | |
115 | 133 | | |
116 | 134 | | |
| |||
137 | 155 | | |
138 | 156 | | |
139 | 157 | | |
| 158 | + | |
140 | 159 | | |
141 | 160 | | |
142 | 161 | | |
| |||
147 | 166 | | |
148 | 167 | | |
149 | 168 | | |
| 169 | + | |
150 | 170 | | |
151 | 171 | | |
152 | 172 | | |
| |||
158 | 178 | | |
159 | 179 | | |
160 | 180 | | |
| 181 | + | |
161 | 182 | | |
162 | 183 | | |
163 | 184 | | |
| |||
209 | 230 | | |
210 | 231 | | |
211 | 232 | | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
212 | 242 | | |
213 | 243 | | |
214 | 244 | | |
| |||
229 | 259 | | |
230 | 260 | | |
231 | 261 | | |
232 | | - | |
| 262 | + | |
| 263 | + | |
233 | 264 | | |
234 | 265 | | |
235 | 266 | | |
| |||
241 | 272 | | |
242 | 273 | | |
243 | 274 | | |
244 | | - | |
| 275 | + | |
| 276 | + | |
245 | 277 | | |
246 | 278 | | |
247 | 279 | | |
248 | 280 | | |
249 | 281 | | |
250 | | - | |
| 282 | + | |
251 | 283 | | |
252 | 284 | | |
253 | 285 | | |
254 | 286 | | |
255 | 287 | | |
256 | 288 | | |
257 | | - | |
| 289 | + | |
| 290 | + | |
258 | 291 | | |
259 | 292 | | |
Lines changed: 20 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
19 | 23 | | |
20 | 24 | | |
21 | 25 | | |
| |||
25 | 29 | | |
26 | 30 | | |
27 | 31 | | |
28 | | - | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
29 | 42 | | |
30 | 43 | | |
31 | 44 | | |
| |||
36 | 49 | | |
37 | 50 | | |
38 | 51 | | |
39 | | - | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
40 | 58 | | |
41 | 59 | | |
Lines changed: 41 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
| 20 | + | |
19 | 21 | | |
20 | 22 | | |
21 | 23 | | |
22 | 24 | | |
23 | 25 | | |
24 | 26 | | |
25 | 27 | | |
| 28 | + | |
| 29 | + | |
26 | 30 | | |
27 | 31 | | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
28 | 40 | | |
29 | 41 | | |
| 42 | + | |
| 43 | + | |
30 | 44 | | |
31 | 45 | | |
32 | | - | |
33 | | - | |
34 | | - | |
| 46 | + | |
35 | 47 | | |
36 | 48 | | |
37 | 49 | | |
| |||
41 | 53 | | |
42 | 54 | | |
43 | 55 | | |
44 | | - | |
45 | | - | |
46 | | - | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
47 | 70 | | |
48 | 71 | | |
49 | 72 | | |
50 | 73 | | |
51 | 74 | | |
52 | 75 | | |
53 | 76 | | |
54 | | - | |
| 77 | + | |
55 | 78 | | |
56 | 79 | | |
57 | 80 | | |
58 | | - | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
59 | 90 | | |
60 | 91 | | |
61 | 92 | | |
62 | 93 | | |
63 | | - | |
| 94 | + | |
| 95 | + | |
64 | 96 | | |
65 | 97 | | |
0 commit comments