Repository navigation
Ignore publisher confirms with an unknown delivery tag in RabbitMQProducer - #131731
Conversation
…oducer` A delivery tag in an ack or nack from the broker is not guaranteed to be in `delivery_record`. `removeRecord` checked it only with `chassert`, then incremented or erased the `end` iterator, which is undefined behavior and could crash the server. For `multiple`, confirm everything up to the tag with `upper_bound`; ignore a single unknown tag with a warning. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Workflow [PR], commit [9194b26] Summary: ✅
AI ReviewSummaryThe PR prevents invalid iterator operations in Missing context / blind spots
Final VerdictStatus: ✅ Approve |
Build profile diff (arm_release)Comparing ✅ No significant changes. Binary sizes
The official master build is compiled with Compile time of recompiled translation units11 translation units recompiled, 21 s compile time in total, 11 of them have a recent master baseline. |
Address review: drive `RabbitMQProducer::removeRecord` directly with unknown and repeated single tags, cumulative acks and nacks whose boundary tag is missing, and an empty record set. Check that unrelated pending records remain and negatively acknowledged payloads are queued for retry exactly once. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…n-delivery-tag Master moved the publisher confirms handling (`removeRecord`, `delivery_record`, `returned`) from `RabbitMQProducer` into the new `RabbitMQPublisher` class (#127611). Resolve the conflict by taking master's `RabbitMQProducer.cpp`, porting the fix for unknown delivery tags to `RabbitMQPublisher::removeRecord`, moving the test friend declaration to `RabbitMQPublisher`, and renaming the unit test to `gtest_rabbitmq_publisher.cpp` to drive `RabbitMQPublisher`. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Backport #131731 to 26.11: Ignore publisher confirms with an unknown delivery tag in `RabbitMQProducer`
Resolve the cherry-pick of #131731 to 26.8. On 26.8 the class is still called `RabbitMQProducer` (renamed to `RabbitMQPublisher` on master), so the fix to `removeRecord` is applied to `RabbitMQProducer.cpp`/`.h`, and the unit test is added as `gtest_rabbitmq_producer.cpp`, adapted to the 26.8 constructor (which takes a `shutdown_called` flag). Co-Authored-By: Claude Opus 5.5 <[email protected]>
Cherry pick #131731 to 26.3: Ignore publisher confirms with an unknown delivery tag in `RabbitMQProducer`
…elivery tag in `RabbitMQProducer`
Cherry pick #131731 to 26.8: Ignore publisher confirms with an unknown delivery tag in `RabbitMQProducer`
…elivery tag in `RabbitMQProducer`
Cherry pick #131731 to 26.9: Ignore publisher confirms with an unknown delivery tag in `RabbitMQProducer`
…elivery tag in `RabbitMQProducer`
Cherry pick #131731 to 26.10: Ignore publisher confirms with an unknown delivery tag in `RabbitMQProducer`
…delivery tag in `RabbitMQProducer`
Backport #131731 to 26.10: Ignore publisher confirms with an unknown delivery tag in `RabbitMQProducer`
Backport #131731 to 26.9: Ignore publisher confirms with an unknown delivery tag in `RabbitMQProducer`
Backport #131731 to 26.8: Ignore publisher confirms with an unknown delivery tag in `RabbitMQProducer`
Backport #131731 to 26.3: Ignore publisher confirms with an unknown delivery tag in `RabbitMQProducer`
The backport of #127611 moved the publisher confirms state (`delivery_record`, `returned`, `removeRecord`) from `RabbitMQProducer` to `RabbitMQPublisher`. The unit test from the backport of #131731 still constructed `RabbitMQProducer` and used these members, so `unit_tests_dbms` did not compile in the debug, sanitizer and `arm_darwin` builds. Test `RabbitMQPublisher` directly, as on master after #131731: the test is `RabbitMQPublisherTest` in `gtest_rabbitmq_publisher.cpp`, and the `friend` declaration moves from `RabbitMQProducer` to `RabbitMQPublisher`. The test cases do not change. #134083
The backport of #127611 moved the publisher confirms state (`delivery_record`, `returned`, `removeRecord`) from `RabbitMQProducer` to `RabbitMQPublisher`. The unit test from the backport of #131731 still constructed `RabbitMQProducer` and used these members, so `unit_tests_dbms` did not compile in the debug, sanitizer and `arm_darwin` builds. Test `RabbitMQPublisher` directly, as on master after #131731: the test is `RabbitMQPublisherTest` in `gtest_rabbitmq_publisher.cpp`, and the `friend` declaration moves from `RabbitMQProducer` to `RabbitMQPublisher`. The test cases do not change. #134084
The backport of #127611 moved the publisher confirms state (`delivery_record`, `returned`, `removeRecord`) from `RabbitMQProducer` to `RabbitMQPublisher`. The unit test from the backport of #131731 still constructed `RabbitMQProducer` and used these members, so `unit_tests_dbms` did not compile in the debug, sanitizer and `arm_darwin` builds. Test `RabbitMQPublisher` directly, as on master after #131731: the test is `RabbitMQPublisherTest` in `gtest_rabbitmq_publisher.cpp`, and the `friend` declaration moves from `RabbitMQProducer` to `RabbitMQPublisher`. The test cases do not change. #134085
A delivery tag in an ack or nack from the broker is not guaranteed to be in
delivery_record.removeRecordchecked it only withchassert, then incremented or erased theenditerator, which is undefined behavior and could crash the server. Formultiple, confirm everything up to the tag withupper_bound; ignore a single unknown tag with a warning.Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Fix a possible crash of the
RabbitMQtable engine when the broker confirms a message with an unknown delivery tag.🤖 Generated with Claude Code
Workflow [PR]
Sync PR [sync-upstream/pr/131731]
Version info
26.12.1.25-master(included in26.12and later)26.11.1.2917,26.10.8.40,26.9.34.21,26.8.42.19,26.3.67.33