Commit 1da2839
authored
[13.x] Cache getLockForPopping() result in DatabaseQueue (#59435)
The lock type is determined by database engine and version, which never
change during a queue worker's lifetime. Cache the result to avoid
repeated PDO attribute lookups, Stringable allocations, regex parsing,
and version_compare calls on every job pop.
Fixes #593501 parent 930e42f commit 1da2839
2 files changed
Lines changed: 35 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
47 | 54 | | |
48 | 55 | | |
49 | 56 | | |
| |||
338 | 345 | | |
339 | 346 | | |
340 | 347 | | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
341 | 352 | | |
342 | 353 | | |
343 | 354 | | |
| |||
354 | 365 | | |
355 | 366 | | |
356 | 367 | | |
357 | | - | |
| 368 | + | |
358 | 369 | | |
359 | 370 | | |
360 | 371 | | |
361 | | - | |
| 372 | + | |
362 | 373 | | |
363 | 374 | | |
364 | | - | |
| 375 | + | |
365 | 376 | | |
366 | 377 | | |
367 | 378 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
196 | 196 | | |
197 | 197 | | |
198 | 198 | | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
199 | 220 | | |
200 | 221 | | |
201 | 222 | | |
| |||
0 commit comments