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):