This repository was archived by the owner on Mar 31, 2026. It is now read-only.
Commit c064815
perf: remove repeated GetSession calls for FixedSizePool (#1252)
* test: add mock server tests
* chore: move to testing folder + fix formatting
* refactor: move mock server tests to separate directory
* feat: add database admin service
Adds a DatabaseAdminService to the mock server and sets up a basic
test case for this.
Also removes the generated stubs in the grpc files, as these are
not needed.
* test: add DDL test
* test: add async client tests
* chore: remove async + add transaction handling
* chore: cleanup
* perf: remove repeated GetSession calls for FixedSizePool
Add a _last_use_time to Session and use this to determine whether the
FixedSizePool should check whether the session still exists, and whether
it should be replaced. This significantly reduces the number of times that
GetSession is called when using FixedSizePool.
* chore: run code formatter
* chore: revert to utcnow()
* 🦉 Updates from OwlBot post-processor
See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md
* fix: update _last_use_time in trace_call
* chore: fix formatting
* fix: remove unnecessary update of _last_use_time
---------
Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>1 parent a214885 commit c064815
File tree
6 files changed
+55
-11
lines changed- google/cloud/spanner_v1
- tests
- mockserver_tests
- unit
6 files changed
+55
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| |||
56 | 57 | | |
57 | 58 | | |
58 | 59 | | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
59 | 63 | | |
60 | 64 | | |
61 | 65 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
145 | 145 | | |
146 | 146 | | |
147 | 147 | | |
148 | | - | |
| 148 | + | |
| 149 | + | |
149 | 150 | | |
150 | 151 | | |
151 | 152 | | |
| |||
171 | 172 | | |
172 | 173 | | |
173 | 174 | | |
| 175 | + | |
174 | 176 | | |
175 | 177 | | |
176 | 178 | | |
177 | 179 | | |
178 | 180 | | |
179 | 181 | | |
180 | 182 | | |
| 183 | + | |
181 | 184 | | |
182 | 185 | | |
183 | 186 | | |
184 | 187 | | |
185 | 188 | | |
| 189 | + | |
186 | 190 | | |
187 | 191 | | |
188 | 192 | | |
| |||
230 | 234 | | |
231 | 235 | | |
232 | 236 | | |
| 237 | + | |
233 | 238 | | |
234 | | - | |
| 239 | + | |
235 | 240 | | |
236 | 241 | | |
237 | 242 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| |||
69 | 70 | | |
70 | 71 | | |
71 | 72 | | |
| 73 | + | |
72 | 74 | | |
73 | 75 | | |
74 | 76 | | |
| |||
78 | 80 | | |
79 | 81 | | |
80 | 82 | | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
81 | 91 | | |
82 | 92 | | |
83 | 93 | | |
| |||
222 | 232 | | |
223 | 233 | | |
224 | 234 | | |
| 235 | + | |
225 | 236 | | |
226 | 237 | | |
227 | 238 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
364 | 365 | | |
365 | 366 | | |
366 | 367 | | |
| 368 | + | |
367 | 369 | | |
368 | 370 | | |
369 | 371 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
33 | 32 | | |
34 | 33 | | |
35 | 34 | | |
| |||
125 | 124 | | |
126 | 125 | | |
127 | 126 | | |
128 | | - | |
| 127 | + | |
129 | 128 | | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
| 129 | + | |
134 | 130 | | |
135 | 131 | | |
136 | 132 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| |||
184 | 185 | | |
185 | 186 | | |
186 | 187 | | |
187 | | - | |
| 188 | + | |
188 | 189 | | |
189 | 190 | | |
190 | 191 | | |
191 | 192 | | |
192 | 193 | | |
193 | 194 | | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
194 | 212 | | |
195 | 213 | | |
196 | 214 | | |
| |||
201 | 219 | | |
202 | 220 | | |
203 | 221 | | |
204 | | - | |
| 222 | + | |
| 223 | + | |
205 | 224 | | |
206 | 225 | | |
207 | 226 | | |
| |||
915 | 934 | | |
916 | 935 | | |
917 | 936 | | |
918 | | - | |
| 937 | + | |
| 938 | + | |
| 939 | + | |
919 | 940 | | |
920 | 941 | | |
921 | 942 | | |
922 | 943 | | |
923 | 944 | | |
924 | 945 | | |
925 | 946 | | |
| 947 | + | |
926 | 948 | | |
927 | 949 | | |
928 | 950 | | |
929 | 951 | | |
| 952 | + | |
| 953 | + | |
| 954 | + | |
| 955 | + | |
930 | 956 | | |
931 | 957 | | |
932 | 958 | | |
| |||
0 commit comments