Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dead letter handling with multiprocQueueBase implementation #71

Open
mistrey opened this issue Dec 15, 2022 · 3 comments
Open

Dead letter handling with multiprocQueueBase implementation #71

mistrey opened this issue Dec 15, 2022 · 3 comments

Comments

@mistrey
Copy link

mistrey commented Dec 15, 2022

With self.handleDeadLetters(startHandling=True), I have registered one Actor in my Actor System to handle dead letters. Whilst this is working as expected with multiprocUDPBase and multiprocUDPBase, it is not working this way in multiprocQueueBase implementation.
Another (apparently random) Actor received the DeadEnvelope message instead.

@kquick
Copy link
Member

kquick commented Dec 18, 2022

Is this something you can provide a minimal sample that reproduces the issue (or a modification of thespian/tests/test_deadLettering.py)?

@mistrey
Copy link
Author

mistrey commented Dec 18, 2022

After replacing multiprocUDPBase by multiprocQueueBase in your tests/test_deadLettering.py, I got 7 failures:

=================================================== short test summary info ===================================================
FAILED test_deadLettering.py::TestFuncDeadLettering::test02_GetDeadLetter[multiprocUDPBase] - assert 0 > 0
FAILED test_deadLettering.py::TestFuncDeadLettering::test03_DLRegisterOnlyOnce[multiprocUDPBase] - assert 0 > 0
FAILED test_deadLettering.py::TestFuncDeadLettering::test13_DLRegisterOnlyOnce[multiprocUDPBase] - assert 0 > 0
FAILED test_deadLettering.py::TestFuncDeadLettering::test04_DLMultipleHandlers[multiprocUDPBase] - assert 0 > 0
FAILED test_deadLettering.py::TestFuncDeadLettering::test14_DLMultipleHandlers[multiprocUDPBase] - assert 0 > 0
FAILED test_deadLettering.py::TestFuncDeadLettering::test05_DLAutoRemoval[multiprocUDPBase] - assert 0 > 0
FAILED test_deadLettering.py::TestFuncDeadLettering::test15_DLAutoRemoval[multiprocUDPBase] - assert 0 > 0
============================= 7 failed, 2079 passed, 254 skipped, 3 xfailed in 2070.49s (0:34:30) =============================

@kquick
Copy link
Member

kquick commented Dec 20, 2022

The lines where I assume you made your replacement are unstable_test(..., 'multiprocUDPBase') lines. Those actually mark the current test as unstable for the indicated base and therefore skipped unless overridden by config (e.g. $ pytest -o unstable=True ...). The effect of your changes was that you enabled the multiprocUDPBase tests, which are known to be unstable and resulted in the 7 failures you indicated above (this base is unstable for these tests because a UDP connection neither guarantees delivery nor does it make an active connection that would be reported as broken or which would report delivery failures if the remote node was no longer present, thus a multiprocUDPBase is not adviseable for this type of operation).

By default and without the changes you made, the multiprocQueueBase is checked for all tests in test_deadLettering.py. You can explicitly confirm this and limit the tests to that base via $ pytest -v -k Queue thespian/test/test_deadLettering.py. Hopefully one of those tests is close to the configuration where you are encountering the dead letter routing problems and you can modify it to demonstrate the behavior you are seeing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants