Repository navigation
Conversation
Point `contrib/AMQP-CPP` at `ClickHouse/v4.3.27` (`cfd37eb7ce75`), which is upstream `v4.3.27` with the ClickHouse patch series rebased on top: - Fix race in `tcp_resolver` - Update `tcpresolver.h` - Port to BoringSSL / make it compatible both with OpenSSL and BoringSSL - Fix RabbitMQ OpenSSL dynamic linking issue - Fix minor glitch with `TLS_client_method` - Fix nullptr dereference in `LibUvHandler` callback when connection is lost - Reject a max frame size of zero proposed by the peer - Bound the negotiated frame size from above and harden the receive buffer - Fail close in `receivefrom` when the receive buffer was never allocated No patch was dropped and none had to be adapted; the previous pin carried the same series on top of `v4.3.18` plus upstream merge commits. Notable upstream changes between `v4.3.18` and `v4.3.27`: - `Channel` and `ChannelImpl` now take `std::string_view` instead of `const std::string &` for queue, exchange, routing key and consumer tag arguments. The values are copied into `StringField`/frame buffers inside the call, and the `ConsumeCallback`/`CancelCallback` signatures still use `const std::string &`, so `src/Storages/RabbitMQ` needs no adaptation. - New `ConnectionHandler::onBlocked` and `ConnectionHandler::onUnblocked` callbacks with the corresponding `connection.blocked` / `connection.unblocked` frames (new headers `src/connectionblockframe.h` and `src/connectionunblockframe.h`). - `connection.start` now advertises the program and platform name (new header-only helpers `src/programname.h` and `src/platformname.h`). The set of `.cpp` files is unchanged, so `contrib/amqpcpp-cmake/CMakeLists.txt` needs no update. Co-Authored-By: Claude Opus 5 <[email protected]>
|
Workflow [PR], commit [a8c4df4] Summary: ❌
AI ReviewSummaryUpdates Findings❌ Blockers
Tests
Final VerdictStatus: ❌ Block. Guard the executable-name lookup failure, implement or disable consumer-cancellation notification, and cover both failure paths before merging. |
| @@ -1 +1 @@ | |||
| Subproject commit 4fccd7f84318fe3a022c63a5b621a831c99e3a32 | |||
| Subproject commit cfd37eb7ce75aff8901f14b41768f21b24b3674f | |||
There was a problem hiding this comment.
This bump changes consumer-cancel behavior in a way ClickHouse does not currently handle. In AMQP-CPP v4.3.27 the client now advertises consumer_cancel_notify in src/connectionstartframe.h, and broker-side basic.cancel frames are routed through src/basiccancelframe.h / src/channelimpl.cpp to DeferredConsumer::onCancelled. But src/Storages/RabbitMQ/RabbitMQConsumer.cpp only installs onSuccess, onReceived, and onError handlers.
That means a queue deletion or temporary queue unavailability no longer has to surface as a channel error: AMQP-CPP can just remove the consumer from its map and invoke onCancelled. Because ClickHouse never registers that callback, state stays OK, needChannelUpdate() stays false, and the source quietly stops consuming until the connection is recreated. With a single queue/consumer table this stalls ingestion completely.
Please either keep consumer_cancel_notify disabled in the fork for now, or teach RabbitMQConsumer::subscribe() to handle onCancelled the same way as onError (log it and switch to State::ERROR) and cover that with a RabbitMQ integration test that removes or makes the queue unavailable after startup.
Build profile diff (arm_release)Comparing commit See the job log for details. |
| @@ -1 +1 @@ | |||
| Subproject commit 4fccd7f84318fe3a022c63a5b621a831c99e3a32 | |||
| Subproject commit cfd37eb7ce75aff8901f14b41768f21b24b3674f | |||
There was a problem hiding this comment.
[P1] Guard failed executable-name lookup before writing the terminator
The new pin introduces src/programname.h, and ConnectionStartFrame::process constructs ProgramName for both product and connection_name on every connection. If readlink fails, size is -1, but line 72 still executes _path[size == PATH_MAX ? PATH_MAX-1 : size] = '\0', writing to _path[-1]. Setting _valid to false does not guard this write.
This happens on macOS, where /proc/self/exe is absent and the RabbitMQ engine remains enabled, and can also happen on Linux when that procfs path is unavailable. A focused reproduction against this exact header, with readlink returning -1 and -fsanitize=undefined -fno-sanitize-recover=all, exits with programname.h:72:51: runtime error: index -1 out of bounds for type 'char [4096]'.
Please patch the fork to handle a negative return before indexing _path, then update the pin. Otherwise normal RabbitMQ connection setup introduces undefined behavior on these systems.
Fork
Carries the same 10 ClickHouse patches as the old pin, rebased onto v4.3.27; none dropped or adapted.
Bumps the AMQP-CPP fork from v4.3.18 to v4.3.27, keeping RabbitMQ on the pinned fork line and picking up the string_view Channel API and the new connection.blocked/unblocked handler callbacks.
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Update
AMQP-CPPto v4.3.27.Workflow [PR]
Sync PR [sync-upstream/pr/119509]