Skip to content
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

[v23.3.x] tx_migration: avoid ping pong of requests between brokers #15980

Merged

Conversation

vbotbuildovich
Copy link
Collaborator

Backport of PR #15953
Fixes: #15979,

(cherry picked from commit c760537)
When leader table is stale (say at startup or during failures), the
current code can result in a ping pong of requests between two brokers
in a tight loop.

Example

- tx_migration_replicate dispatched from node 1 to node 2 (because node 1
thinks node 2 is the leader)
- node 2 dispatches the request back to node 1 because it thinks node 1
is the leader.

Until leadership stabilizes this results in a huge pile up of requests
which manifested as an oversized allocation.

Don't think a router is the right choice in the handler as the handler
is supposed to process the request locally. If it returns an error, it
is propagated to the source router which dispatches to the correct
leader. This also breaks the ping pong loop as the source router has
sleeps induced for retry backoff.

(cherry picked from commit a174ba2)
@vbotbuildovich vbotbuildovich added this to the v23.3.x-next milestone Jan 6, 2024
@vbotbuildovich vbotbuildovich added the kind/backport PRs targeting a stable branch label Jan 6, 2024
@piyushredpanda
Copy link
Contributor

/ci-repeat

@piyushredpanda piyushredpanda modified the milestones: v23.3.x-next, v23.3.2 Jan 8, 2024
@piyushredpanda piyushredpanda marked this pull request as ready for review January 8, 2024 06:46
@bharathv bharathv merged commit 1be646a into redpanda-data:v23.3.x Jan 8, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/redpanda kind/backport PRs targeting a stable branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants