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

c/p_leaders: check if leaders table was modified after async iteration #16711

Merged
merged 2 commits into from
Feb 27, 2024

Conversation

mmaslankaprv
Copy link
Member

@mmaslankaprv mmaslankaprv commented Feb 26, 2024

Since leaders table might have been modified during the execution of iteration over the topic partitions we must check the version of topics table after the asynchronous iteration finished.

Backports Required

  • none - not a bug fix
  • none - this is a backport
  • none - issue does not exist in previous branches
  • none - papercut/not impactful enough to backport
  • v23.3.x
  • v23.2.x
  • v23.1.x

Release Notes

  • none

Since leaders table might have been modified during the execution of
iteration over the topic partitions we must check the version of topics
table after the asynchronous iteration finished.

Signed-off-by: Michal Maslanka <michal@redpanda.com>
bharathv
bharathv previously approved these changes Feb 26, 2024
Copy link
Member

@StephanDollberg StephanDollberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't we need the same in update_with_node_report?

Signed-off-by: Michal Maslanka <michal@redpanda.com>
@mmaslankaprv
Copy link
Member Author

Don't we need the same in update_with_node_report?

no, as in node report we iterate over the report itself so the change of partition leaders table version doesn't matter, what matters is to check before accessing previously found t_it which is done inside the async loop. In other words iterator of outer loop will not be invalidated as the node_report.topics doesn't change

@mmaslankaprv mmaslankaprv merged commit d846935 into redpanda-data:dev Feb 27, 2024
16 checks passed
@mmaslankaprv mmaslankaprv deleted the leader-table-fix branch February 27, 2024 10:04
@vbotbuildovich
Copy link
Collaborator

/backport v23.3.x

@vbotbuildovich
Copy link
Collaborator

Failed to create a backport PR to v23.3.x branch. I tried:

git remote add upstream https://github.com/redpanda-data/redpanda.git
git fetch --all
git checkout -b backport-pr-16711-v23.3.x-498 remotes/upstream/v23.3.x
git cherry-pick -x 625fb441ffccadfe476a2a924247dfef8aeb1066 6eaa7b8278bbcc1ccbb3173e4d1ed98e2ac73175

Workflow run logs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants