avoid lost messages after activate message

messages might get lost after activate, when the number of parameters
exceeds maxlen of the output queue, as a limited deque silently overwrites
messages.

first try: use an infinite deque, but slow down appending thread when deque
gets too big
-> does not work because the appending thread is the same

second try: increase maximum a lot, on overflow log an error message and
close connection

Change-Id: I20376f7e08240dabe43269fa63c596f07e59ddf6
Reviewed-on: https://forge.frm2.tum.de/review/20982
Tested-by: JenkinsCodeReview <bjoern_pedersen@frm2.tum.de>
Reviewed-by: Enrico Faulhaber <enrico.faulhaber@frm2.tum.de>
Reviewed-by: Markus Zolliker <markus.zolliker@psi.ch>
This commit is contained in:
2019-08-05 17:15:12 +02:00
parent 1e6fa76717
commit cd1b4cf4e2
3 changed files with 19 additions and 8 deletions

View File

@@ -24,10 +24,10 @@
Interface to the service offering part:
- 'handle_request(connectionobj, data)' handles incoming request
will call 'queue_request(data)' on connectionobj before returning
it returns the (sync) reply, and it may call 'queue_async_reply(data)'
on the connectionobj
- 'add_connection(connectionobj)' registers new connection
- 'remove_connection(connectionobj)' removes now longer functional connection
- may at any time call 'queue_async_request(connobj, data)' on the connobj
Interface to the modules:
- add_module(modulename, moduleobj, export=True) registers a new module under the
@@ -286,7 +286,7 @@ class Dispatcher(object):
def handle_request(self, conn, msg):
"""handles incoming request
will call 'queue_async_request(data)' on conn or return reply
will call 'queue_async_reply(data)' on conn or return reply
"""
self.log.debug(u'Dispatcher: handling msg: %s' % repr(msg))