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

Disable tablets load balancing on taking the snapshot #3759

Closed
karol-kokoszka opened this issue Mar 18, 2024 · 3 comments · Fixed by #3753
Closed

Disable tablets load balancing on taking the snapshot #3759

karol-kokoszka opened this issue Mar 18, 2024 · 3 comments · Fixed by #3753
Assignees
Milestone

Comments

@karol-kokoszka
Copy link
Collaborator

We must ensure that tablets load balancing is disabled before taking the snapshot and to reenable (!) it just afterwards.

The endpoint is as follow:

         "path":"/storage_service/tablets/balancing",
         "operations":[
            {
               "nickname":"tablet_balancing_enable",
               "method":"POST",
               "summary":"Controls tablet load-balancing",
               "type":"void",
               "produces":[
                  "application/json"
               ],
               "parameters":[
                  {
                     "name":"enabled",
                     "description":"When set to false, tablet load balancing is disabled",
                     "required":true,
                     "allowMultiple":false,
                     "type":"boolean",
                     "paramType":"query"
                  }
               ]
            }
         ]

Tablets could migrate during the snapshot creation time otherwise what makes the snapshot useless.

It must be used only on tablets enabled environment.

@tzach
Copy link
Collaborator

tzach commented Mar 18, 2024

@bhalevy FYI

@Michal-Leszczynski Michal-Leszczynski self-assigned this Mar 20, 2024
@Michal-Leszczynski
Copy link
Collaborator

Michal-Leszczynski commented Mar 20, 2024

Is it safe to assume that we always want to disable it for taking a snapshot and always enable it afterwards?

What about a situation when (for whatever reason) SM snapshots a cluster with already disabled tablet migration. Should SM enable tablet migration after snapshot anyway? I don't see any endpoint for checking if tablet migration is enabled or not, so it's not possible for SM keep the original tablet migration state after snapshot.

@bhalevy @tzach

@bhalevy
Copy link
Member

bhalevy commented Mar 20, 2024

Using the api to temporarily disable load balancing is an interim solution.
It's not design to be perfect or robust in any way.
We should implement a simple solution that disables LB unconditionally before snapshot and enables it afterwards

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

Successfully merging a pull request may close this issue.

4 participants