From 14050b920f95edd4edada72ae1d97f294c503d49 Mon Sep 17 00:00:00 2001 From: Sugu Sougoumarane Date: Sun, 6 Apr 2014 21:59:38 -0700 Subject: [PATCH] gorpc: Change ssl timeout to be different from normal The different error message will help trouble shoot the root cause of problems better. Also, fixed some typos. --- go/vt/tabletserver/queryctl.go | 5 +---- py/net/gorpc.py | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/go/vt/tabletserver/queryctl.go b/go/vt/tabletserver/queryctl.go index f2ebaab071..0b418f40f3 100644 --- a/go/vt/tabletserver/queryctl.go +++ b/go/vt/tabletserver/queryctl.go @@ -35,9 +35,8 @@ func init() { flag.Float64Var(&qsConfig.QueryTimeout, "queryserver-config-query-timeout", DefaultQsConfig.QueryTimeout, "query server query timeout") flag.Float64Var(&qsConfig.IdleTimeout, "queryserver-config-idle-timeout", DefaultQsConfig.IdleTimeout, "query server idle timeout") flag.Float64Var(&qsConfig.SpotCheckRatio, "queryserver-config-spot-check-ratio", DefaultQsConfig.SpotCheckRatio, "query server rowcache spot check frequency") - flag.Float64Var(&qsConfig.StreamWaitTimeout, "queryserver-config-stream-exec-timeout", DefaultQsConfig.StreamWaitTimeout, "Timeout for stream-exec-throttle") flag.BoolVar(&qsConfig.SensitiveMode, "queryserver-config-sensitive-mode", DefaultQsConfig.SensitiveMode, "enabling sensitive mode anonymizes queries when displaying diagnostics") - flag.BoolVar(&qsConfig.StrictMode, "queryserver-config-strict-mode", DefaultQsConfig.StrictMode, "stict mode allows all DMLs and does not enforce MySQL's STRICT_TRANS_TABLES") + flag.BoolVar(&qsConfig.StrictMode, "queryserver-config-strict-mode", DefaultQsConfig.StrictMode, "strict mode allows all DMLs and does not enforce MySQL's STRICT_TRANS_TABLES") flag.StringVar(&qsConfig.RowCache.Binary, "rowcache-bin", DefaultQsConfig.RowCache.Binary, "rowcache binary file") flag.IntVar(&qsConfig.RowCache.Memory, "rowcache-memory", DefaultQsConfig.RowCache.Memory, "rowcache max memory usage in MB") flag.StringVar(&qsConfig.RowCache.Socket, "rowcache-socket", DefaultQsConfig.RowCache.Socket, "rowcache socket path to listen on") @@ -98,7 +97,6 @@ type Config struct { IdleTimeout float64 RowCache RowCacheConfig SpotCheckRatio float64 - StreamWaitTimeout float64 SensitiveMode bool StrictMode bool } @@ -124,7 +122,6 @@ var DefaultQsConfig = Config{ StreamBufferSize: 32 * 1024, RowCache: RowCacheConfig{Memory: -1, TcpPort: -1, Connections: -1, Threads: -1}, SpotCheckRatio: 0, - StreamWaitTimeout: 4 * 60, SensitiveMode: false, StrictMode: true, } diff --git a/py/net/gorpc.py b/py/net/gorpc.py index 04a2ae1e5a..9a667299bf 100644 --- a/py/net/gorpc.py +++ b/py/net/gorpc.py @@ -186,7 +186,7 @@ class GoRpcClient(object): except ssl.SSLError as e: # another possible timeout condition with SSL wrapper if 'timed out' in str(e): - raise TimeoutError(e, self.timeout, 'dial', self.uri) + raise TimeoutError(e, self.timeout, 'ssl-dial', self.uri) raise GoRpcError(e) except socket.error as e: raise GoRpcError(e)