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

Reset leaders table #4237

Merged
merged 8 commits into from
Apr 12, 2022
Merged

Conversation

VadimPlh
Copy link
Contributor

@VadimPlh VadimPlh commented Apr 8, 2022

Cover letter

This pr implements new admin_api request to reset leaders_table on node.

On some cases leaders_table can not be updated long time. So client request can be failed in this cases.
New request allows us force leaders table by hand, after it shard should be refresh all info about leaders.

"path": "/v1/debug/reset_leaders",
"operations": [
    {
        "method": "POST",
        "summary": "Reset information about leaders for node",
      ...
  }

Release notes

  • Add /v1/debug/reset_leaders request to reset leaders info on node

@VadimPlh VadimPlh marked this pull request as ready for review April 8, 2022 13:00
src/v/cluster/metadata_cache.cc Show resolved Hide resolved
src/v/redpanda/admin/api-doc/partition.json Outdated Show resolved Hide resolved
tests/rptest/tests/leaders_info_api_test.py Outdated Show resolved Hide resolved
@VadimPlh VadimPlh force-pushed the reset-leaders-table branch 2 times, most recently from 78d6d09 to 5a4c565 Compare April 11, 2022 10:27
@VadimPlh VadimPlh requested review from dotnwat and jcsp April 11, 2022 10:44
This request is used to refresh leaders info on node
User can invoke it by using admin api

On some cases leaders_table can not be updated long time
So client request can be failed in this cases. New request
allows us force leaders table by hand, after it shard should be
refresh all info about leaders.

After reset leaders info, metadata responce will not contain
leaders for all partition during short period of time ~150ms.
heartbits delay or leader notification delay.
@jcsp
Copy link
Contributor

jcsp commented Apr 11, 2022

👍 test looks pretty reasonable to me now. Not sure if Noah had some other thoughts about alternatives to EndToEndTest, so will pause for input in his daytime before proceeding

Copy link
Member

@dotnwat dotnwat left a comment

Choose a reason for hiding this comment

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

thanks @VadimPlh. The changes and the PR look great.

This pull request was closed.
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.

admin_api: Added reset/get leaders_table requests
4 participants