-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
(Initial, incomplete) OTP26 compatibility #7900
Conversation
OTP-26 changed the default version for binary_to_term from 1 to 2. There's one place where we explicitly ask for version 1 anyway (in the STOMP plugin) and seems like we need to keep it like this.
These algorithms, introduced in OTP-26, are not compatible with what we do in this test.
Fix for OTP-26+. We don't care about the security of the TLS connection in that test.
We don't care about the security of the TLS connection in that test.
While at it, refactor `rabbit_misc:plmerge/2` to use the same precedence as maps:merge and lists:merge (the second argument supersedes the first one)
This no longer works with OTP-26 and will not work moving forward. So we do like ssl and simulate a real port command.
An inadvertent dependency on small map atom key ordering had been taken inside the stream election code in the stream coordinator state machine. With the key ordering changes in OTP 26 this resulted in divergent state in different stream coordinator members which resulted in stream recovery failing.
The test was also not testing what it claimed to test (it was using verify_none so not sending the client certificates). This commit fixed that as well.
OTP-26 sets verify_peer by default so the warning is no longer relevant. The function can be removed when we support OTP-26+ only.
99e8d6d
to
69f48a0
Compare
Similarly to #7663, increase the message size and decrease the client buffer sizes. This change is needed because we switched from erlang:port_command/2 to gen_tcp:send/2. The former is a bit more asynchronous than the latter because the latter waits for the inet_reply from the port.
In OTP 25, gen_tcp:send/2 has poor performance when the Erlang mailbox is large because the selective receive is not optimised. https://erlang.org/download/otp_src_26.0-rc3.readme OTP-18520 Application(s): erts Related Id(s): GH-6455 gen_tcp:send/*, gen_udp:send/* and gen_sctp:send/* have been optimized to use the infamous receive reference optimization, so now sending should not have bad performance when the calling process has a large message queue.
David has addressed his own review
(Initial, incomplete) OTP26 compatibility (backport #7900)
Revert the change introduced in #7900 RabbitMQ 3.12 will require OTP 25 (not yet OTP 26). The use of macro `OTP_RELEASE` was wrong because RabbitMQ can be compiled with OTP 25, but run with OTP 26. Macros are evaluated at compile time. An alternative runtime equivalent would have been ``` 1> erlang:system_info(otp_release). "26" ```
Revert the change introduced in #7900 RabbitMQ 3.12 will require OTP 25 (not yet OTP 26). The use of macro `OTP_RELEASE` was wrong because RabbitMQ can be compiled with OTP 25, but run with OTP 26. Macros are evaluated at compile time. An alternative runtime equivalent would have been ``` 1> erlang:system_info(otp_release). "26" ``` (cherry picked from commit 81d21f5)
@Mergifyio backport v3.11.x |
✅ Backports have been created
|
Backporting this to |
Revert the change introduced in #7900 RabbitMQ 3.12 will require OTP 25 (not yet OTP 26). The use of macro `OTP_RELEASE` was wrong because RabbitMQ can be compiled with OTP 25, but run with OTP 26. Macros are evaluated at compile time. An alternative runtime equivalent would have been ``` 1> erlang:system_info(otp_release). "26" ``` (cherry picked from commit 81d21f5)
I have backported all commits from this PR except for c8b4742. The delta in stream coordinator code is non-trivial. However, with these improvements nodes can accept connections and generally work fine (all Bunny tests pass, for example). So this is a sufficient improvement to ship, right now RabbitMQ 3.11.16 on Erlang 26 cannot accept client connections, which makes us look really bad to the Windows users who download the latest Erlang installer. |
NOTE: do not merge yet (PR created to run tests on OTP25)
WIP: changes needed for OTP26 compatibility. This doesn't address all the issues at this point