Commit 1096ee2
Moves dead_retry and socket_timeout into the MemcachedBackend class
Moved the :paramref:`.MemcacheArgs.dead_retry` argument and the
:paramref:`.MemcacheArgs.socket_timeout` argument which were
erroneously added to the "set_parameters",
where they have no effect, to be part of the Memcached connection
arguments :paramref:`.MemcachedBackend.dead_retry`,
:paramref:`.MemcachedBackend.socket_timeout`.
Indeed, In my previous patch [1] I proposed to add the ``dead_retry`` and ``socket_timeout`` params to the ``MemcacheArgs`` class. I was wrong. My goal was to pass these parameters to the client during its initialization to set the memcached client dead_retry and socket_timeout arguments [2].
By using the MemcacheArgs they are passed to the method calls which is not what it was requested in the feature request [3]. I misunderstood the goal of this class (MemcacheArgs).
The ``MemcacheArgs`` class is only inherited by the ``MemcachedBackend`` class and the ``PylibmcBackend`` class. Both libraries doesn't support ``dead_retry`` and ``socket_timeout`` in their methods related to the memcache API commands (set, get, set_multi, etc), so for this reason I think we can move those parameters safely.
My previous patch led to issues [4][5] that I'm able to reproduce locally by using oslo.cache's functional test. These changes fix these issues.
[1] 1de93aa
[2] https://github.com/linsomniac/python-memcached/blob/7942465eba2009927e5d14b4b6dbd48b75780d80/memcache.py#L165
[3] #223
[4] https://bugzilla.redhat.com/show_bug.cgi?id=2103117
[5] https://review.opendev.org/c/openstack/requirements/+/848827
Closes: #228
Pull-request: #228
Pull-request-sha: dcef04b
Change-Id: Ic77c1d657b81449a34114cf9f61c350ffc7e2ba11 parent d60ed49 commit 1096ee2
3 files changed
Lines changed: 60 additions & 36 deletions
File tree
- docs/build/unreleased
- dogpile/cache/backends
- tests/cache
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
220 | 220 | | |
221 | 221 | | |
222 | 222 | | |
223 | | - | |
224 | | - | |
225 | | - | |
226 | | - | |
227 | | - | |
228 | | - | |
229 | | - | |
230 | | - | |
231 | | - | |
232 | | - | |
233 | 223 | | |
234 | 224 | | |
235 | 225 | | |
| |||
242 | 232 | | |
243 | 233 | | |
244 | 234 | | |
245 | | - | |
246 | | - | |
247 | | - | |
248 | | - | |
249 | 235 | | |
250 | 236 | | |
251 | 237 | | |
| |||
316 | 302 | | |
317 | 303 | | |
318 | 304 | | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
319 | 321 | | |
320 | 322 | | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
321 | 328 | | |
322 | 329 | | |
323 | 330 | | |
324 | 331 | | |
325 | 332 | | |
326 | | - | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
327 | 338 | | |
328 | 339 | | |
329 | 340 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
380 | 380 | | |
381 | 381 | | |
382 | 382 | | |
383 | | - | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
384 | 388 | | |
385 | 389 | | |
386 | 390 | | |
| |||
422 | 426 | | |
423 | 427 | | |
424 | 428 | | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
425 | 447 | | |
426 | 448 | | |
427 | 449 | | |
| |||
476 | 498 | | |
477 | 499 | | |
478 | 500 | | |
479 | | - | |
480 | | - | |
481 | | - | |
482 | | - | |
483 | | - | |
484 | | - | |
485 | | - | |
486 | | - | |
487 | | - | |
488 | | - | |
489 | | - | |
490 | | - | |
491 | | - | |
492 | | - | |
493 | | - | |
494 | | - | |
495 | | - | |
496 | | - | |
497 | | - | |
498 | | - | |
499 | 501 | | |
500 | 502 | | |
501 | 503 | | |
| |||
0 commit comments