Merge "Change memcache_socket_timeout to a float"

This commit is contained in:
Zuul 2018-03-28 04:24:40 +00:00 committed by Gerrit Code Review
commit 42aaf9c7d7
3 changed files with 11 additions and 6 deletions

View File

@ -82,11 +82,11 @@ FILE_OPTIONS = {
help='Number of seconds memcached server is considered dead'
' before it is tried again. (dogpile.cache.memcache and'
' oslo_cache.memcache_pool backends only).'),
cfg.IntOpt('memcache_socket_timeout',
default=3,
help='Timeout in seconds for every call to a server.'
' (dogpile.cache.memcache and oslo_cache.memcache_pool'
' backends only).'),
cfg.FloatOpt('memcache_socket_timeout',
default=3.0,
help='Timeout in seconds for every call to a server.'
' (dogpile.cache.memcache and oslo_cache.memcache_pool'
' backends only).'),
cfg.IntOpt('memcache_pool_maxsize',
default=10,
help='Max total number of open connections to every'

View File

@ -45,7 +45,7 @@ class PooledMemcachedBackend(memcached_backend.MemcachedBackend):
self.url,
arguments={
'dead_retry': arguments.get('dead_retry', 5 * 60),
'socket_timeout': arguments.get('socket_timeout', 3),
'socket_timeout': arguments.get('socket_timeout', 3.0),
},
maxsize=arguments.get('pool_maxsize', 10),
unused_timeout=arguments.get('pool_unused_timeout', 60),

View File

@ -0,0 +1,5 @@
---
features:
- |
`memcache_socket_timeout` is changed to float, given the same default value
'3.0'.