зеркало из https://github.com/github/vitess-gh.git
test: Add throttler_client_protocol to protocol_flavor.py.
It is required for the vtctl throttler commands.
This commit is contained in:
Родитель
57adb68bea
Коммит
82b17c9750
|
@ -37,6 +37,9 @@ class GRpcProtocolsFlavor(protocols_flavor.ProtocolsFlavor):
|
|||
def tabletconn_protocol(self):
|
||||
return 'grpc'
|
||||
|
||||
def throttler_client_protocol(self):
|
||||
return 'grpc'
|
||||
|
||||
def vtgate_protocol(self):
|
||||
return 'grpc'
|
||||
|
||||
|
|
|
@ -46,6 +46,13 @@ class ProtocolsFlavor(object):
|
|||
"""The protocol to use for connections from vtctl/vtgate to vttablet."""
|
||||
raise NotImplementedError('Not implemented in the base class')
|
||||
|
||||
def throttler_client_protocol(self):
|
||||
"""Client protocol for the resharding throttler.
|
||||
|
||||
This RPC interface is enabled in vtworker and vttablet.
|
||||
"""
|
||||
raise NotImplementedError('Not implemented in the base class')
|
||||
|
||||
def vtgate_protocol(self):
|
||||
"""The protocol to use to talk to vtgate, in go."""
|
||||
raise NotImplementedError('Not implemented in the base class')
|
||||
|
|
|
@ -735,6 +735,8 @@ def run_vtctl_vtctl(clargs, auto_log=False, expect_fail=False,
|
|||
args.extend(['-tablet_manager_protocol',
|
||||
protocols_flavor().tablet_manager_protocol()])
|
||||
args.extend(['-tablet_protocol', protocols_flavor().tabletconn_protocol()])
|
||||
args.extend(['-throttler_client_protocol',
|
||||
protocols_flavor().throttler_client_protocol()])
|
||||
args.extend(['-vtgate_protocol', protocols_flavor().vtgate_protocol()])
|
||||
|
||||
if auto_log:
|
||||
|
@ -1097,8 +1099,10 @@ class Vtctld(object):
|
|||
'--port', str(self.port),
|
||||
'-tablet_manager_protocol',
|
||||
protocols_flavor().tablet_manager_protocol(),
|
||||
'-vtgate_protocol', protocols_flavor().vtgate_protocol(),
|
||||
'-tablet_protocol', protocols_flavor().tabletconn_protocol(),
|
||||
'-throttler_client_protocol',
|
||||
protocols_flavor().throttler_client_protocol(),
|
||||
'-vtgate_protocol', protocols_flavor().vtgate_protocol(),
|
||||
] + environment.topo_server().flags()
|
||||
if enable_schema_change_dir:
|
||||
args += [
|
||||
|
|
Загрузка…
Ссылка в новой задаче