Skip to content

Cherry pick #131731 to 26.3: Ignore publisher confirms with an unknown delivery tag in RabbitMQProducer - #133181

Merged
robot-ch-test-poll merged 7 commits into
backport/26.3/131731from
cherrypick/26.3/131731
Nov 20, 2026
Merged

robot-ch-test-poll merged 7 commits into
backport/26.3/131731from
cherrypick/26.3/131731

Conversation

@robot-ch-test-poll4

Copy link
Copy Markdown
Contributor

Original pull-request #131731

Do not merge this PR manually

This pull-request is a first step of an automated backporting.
It contains changes similar to calling git cherry-pick locally.
If you intend to continue backporting the changes, then resolve all conflicts if any.
Otherwise, if you do not want to backport them, then just close this pull-request.

The check results does not matter at this step - you can safely ignore them.

Before you resolve anything

Conflicts are often caused by a prerequisite change that has not been backported yet, rather than by a real divergence. The bot re-tries this cherry-pick against the release branch on every run, so if that is the case here it will merge itself as soon as the prerequisite lands, and you will see a comment saying so. Manual resolution is only needed while the conflict persists.

Troubleshooting

If the conflicts were resolved in a wrong way

If this cherry-pick PR is completely screwed by a wrong conflicts resolution, and you want to recreate it:

  • delete the pr-cherrypick label from the PR
  • delete this branch from the repository

You also need to check the Original pull-request for pr-backports-created label, and delete if it's presented there

The PR source

The PR is created in the CI job

alexey-milovidov and others added 6 commits November 15, 2026 04:06
…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]>
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]>
…ery-tag

Ignore publisher confirms with an unknown delivery tag in `RabbitMQProducer`
@robot-ch-test-poll4 robot-ch-test-poll4 added pr-cherrypick Cherry-pick of merge-commit before backporting. Do not use manually - automated use only! do not test disable testing on pull request pr-critical-bugfix labels Nov 20, 2026
26.3 has no `RabbitMQPublisher` (it was introduced on master later); the code it
replaced is `RabbitMQProducer`. Port the `removeRecord` fix there: look up the
boundary with `upper_bound` for `multiple` confirms, and ignore a single ack/nack
with an unknown delivery tag instead of asserting.

The gtest is adapted to construct a `RabbitMQProducer` (which needs a
`shutdown_called` flag) and is a friend of it. The file keeps its original name.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@robot-ch-test-poll
robot-ch-test-poll merged commit ea04e0e into backport/26.3/131731 Nov 20, 2026
2 checks passed
@robot-ch-test-poll
robot-ch-test-poll deleted the cherrypick/26.3/131731 branch November 20, 2026 11:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do not test disable testing on pull request pr-cherrypick Cherry-pick of merge-commit before backporting. Do not use manually - automated use only! pr-critical-bugfix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants