Change in vdsm[master]: jsonrpc: executor based thread factory
piotr.kliczewski at gmail.com
piotr.kliczewski at gmail.com
Mon Jul 20 11:49:47 UTC 2015
Piotr Kliczewski has posted comments on this change.
Change subject: jsonrpc: executor based thread factory
......................................................................
Patch Set 1:
(1 comment)
https://gerrit.ovirt.org/#/c/43759/1/vdsm/rpc/bindingjsonrpc.py
File vdsm/rpc/bindingjsonrpc.py:
Line 64: def __init__(self, bridge, subs, timeout):
Line 65: _scheduler.start()
Line 66: _executor.start()
Line 67:
Line 68: self._server = JsonRpcServer(bridge, timeout, _executorFactory)
> It does not make sense to queue requests for ever. We should find a way to
No there are no stomp specific errors.
We attempted to run threadFactory in following way:
try:
self._threadFactory(partial(self._serveRequest, ctx, request))
except Exception as e:
self.log.exception("could not allocate request thread")
ctx.requestDone(
JsonRpcResponse(
None,
JsonRpcInternalError(
str(e)
),
request.id
)
)
and TooManyTasks will be processed in the same way now.
The engine tries to understand what happened (assuming non-zero code) based on error code. There is specific error handling logic which maps error code to specific exception (BrokerCommandBase#proceedProxyReturnValue) and handling of a specific exception is done of each Command(verb) level.
Line 69: self._reactor = StompReactor(subs)
Line 70: self.startReactor()
Line 71:
Line 72: def add_socket(self, reactor, client_socket):
--
To view, visit https://gerrit.ovirt.org/43759
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I56b307633a8bf7e4aad8f87cc97a4129c9ed0970
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Piotr Kliczewski <piotr.kliczewski at gmail.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczewski at gmail.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei at redhat.com>
Gerrit-Reviewer: Yeela Kaplan <ykaplan at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-HasComments: Yes
More information about the vdsm-patches
mailing list