-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Fix zmq_proxy_steerable #4600
Fix zmq_proxy_steerable #4600
Conversation
|
|
It's in any of the failed OBS CI jobs listed below, they are all 32bit builds |
please rebase and squash the fixup commit |
Problem: the new reimplementation of zmq_proxy_steerable had PAUSE/RESUME that didn't follow expected behaviour. Possibly mixed up. Test didn't properly cover the issue. Solution: improve test coverage, fix the proxy command parsing. I had no knowledge of the pre-MPL-2.0 implementation. This fix is based on documented semantics and prior API usage. I contribute this under MPL-2.0.
Problem: reimplemented zmq_proxy_steerable control socket type is not backwards compatible - replies are always sent. In the past, zmq_proxy_steerable never sent a reply for commands that weren't STATISTICS, so only really worked with PAIR and didn't work at all with REP. Now it only supports REP and PAIR semantics changed. This breaks compatibility with PAIR in a subtle and slightly annoying way if HWMs are hit without reading the replies. Solution: Add a check to send the empty reply only for REP control sockets. This restores backwards compatibility, and supports REP, PAIR, and SUB (for non-reply commands). I had no knowledge of the pre-MPL-2.0 implementation. This fix is based on docs and prior API usage. I contribute this under MPL-2.0.
49553eb
to
058ad60
Compare
For posterity, when the previous implementation used a |
Yes, SUB control socket will work now as long as you only send non-replying commands. It will still encounter ENOTSUP and exit the proxy call with -1 if you do send STATISTICS. Which from a developer's perspective is probably better than silently dropping the command. |
The test is flacky and fails on slow architectures: [ 2361s] FAIL: tests/test_proxy_steerable |
Continuing Brett's work on zmq_proxy_steerable here: #4598
2 problems addressed (split into 2 commits):
I agree that REP makes the most sense for the control socket type, but prior semantics of the control socket pretty much dictated the use ZMQ_PAIR, so this just restores backwards compatibility.
New test assertions with existing src/proxy.cpp: