Commit 11e4a90
authored
fix: stop sending RPCs to deleted database (#34)
* fix: stop sending rpcs on deleted db
* fix: client should stop sending rpcs after database dropped
DatabaseClients should not continue to try to send RPCs to a database that has
been deleted. Instead, the session pool will keep track of whether a database
not found error has been returned for a database, and if so, will invalidate
itself. All subsequent calls for this database will return a DatabaseNotFoundException
without calling a RPC.
If a database is re-created, the user must create a new DatabaseClient with a new
session pool in order to resume usage of the database.
Fixes #16
* fix: remove double check on isValid
* fix: add wait to deleted db integration test
* fix: process review comments
* fix: update copyright year1 parent 384ddb4 commit 11e4a90
File tree
7 files changed
+371
-55
lines changed- google-cloud-spanner/src
- main/java/com/google/cloud/spanner
- test/java/com/google/cloud/spanner
- it
7 files changed
+371
-55
lines changedLines changed: 34 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
Lines changed: 47 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
| |||
775 | 776 | | |
776 | 777 | | |
777 | 778 | | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
778 | 788 | | |
779 | 789 | | |
780 | 790 | | |
| |||
1056 | 1066 | | |
1057 | 1067 | | |
1058 | 1068 | | |
| 1069 | + | |
| 1070 | + | |
| 1071 | + | |
1059 | 1072 | | |
1060 | 1073 | | |
1061 | 1074 | | |
| |||
1193 | 1206 | | |
1194 | 1207 | | |
1195 | 1208 | | |
1196 | | - | |
| 1209 | + | |
1197 | 1210 | | |
1198 | 1211 | | |
1199 | 1212 | | |
| |||
1225 | 1238 | | |
1226 | 1239 | | |
1227 | 1240 | | |
| 1241 | + | |
| 1242 | + | |
| 1243 | + | |
| 1244 | + | |
| 1245 | + | |
| 1246 | + | |
| 1247 | + | |
1228 | 1248 | | |
1229 | 1249 | | |
1230 | 1250 | | |
| |||
1251 | 1271 | | |
1252 | 1272 | | |
1253 | 1273 | | |
| 1274 | + | |
| 1275 | + | |
| 1276 | + | |
| 1277 | + | |
| 1278 | + | |
| 1279 | + | |
| 1280 | + | |
| 1281 | + | |
| 1282 | + | |
1254 | 1283 | | |
1255 | 1284 | | |
1256 | 1285 | | |
| |||
1304 | 1333 | | |
1305 | 1334 | | |
1306 | 1335 | | |
| 1336 | + | |
1307 | 1337 | | |
1308 | 1338 | | |
| 1339 | + | |
| 1340 | + | |
| 1341 | + | |
| 1342 | + | |
| 1343 | + | |
| 1344 | + | |
| 1345 | + | |
| 1346 | + | |
| 1347 | + | |
1309 | 1348 | | |
1310 | 1349 | | |
1311 | 1350 | | |
| |||
1448 | 1487 | | |
1449 | 1488 | | |
1450 | 1489 | | |
| 1490 | + | |
| 1491 | + | |
| 1492 | + | |
1451 | 1493 | | |
1452 | 1494 | | |
1453 | 1495 | | |
| |||
1470 | 1512 | | |
1471 | 1513 | | |
1472 | 1514 | | |
| 1515 | + | |
| 1516 | + | |
| 1517 | + | |
| 1518 | + | |
1473 | 1519 | | |
1474 | 1520 | | |
1475 | 1521 | | |
| |||
Lines changed: 11 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
| |||
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
39 | 48 | | |
40 | 49 | | |
41 | 50 | | |
| |||
176 | 185 | | |
177 | 186 | | |
178 | 187 | | |
| 188 | + | |
| 189 | + | |
179 | 190 | | |
180 | 191 | | |
181 | 192 | | |
| |||
Lines changed: 11 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
91 | 94 | | |
92 | 95 | | |
93 | 96 | | |
| |||
210 | 213 | | |
211 | 214 | | |
212 | 215 | | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
213 | 222 | | |
214 | 223 | | |
215 | 224 | | |
| |||
239 | 248 | | |
240 | 249 | | |
241 | 250 | | |
242 | | - | |
| 251 | + | |
| 252 | + | |
243 | 253 | | |
244 | 254 | | |
245 | 255 | | |
| |||
0 commit comments