Skip to content

Conversation

@xumengpanda
Copy link
Contributor

This PR solves the Issue #1845.

We reduces the priority for removing redundant teams from 700 to 210, lower than merge or split shard priority.

@xumengpanda xumengpanda added this to the 6.2 milestone Jul 17, 2019
@xumengpanda
Copy link
Contributor Author

This turns out to be more complex than I thought.
The one line change is not enough.

I will wait for the server team remover PR to be merged and then get back to this PR.

PRIORITY_TEAM_REDUNDANT should be in a different priority band from
PRIORITY_MERGE_SHARD and PRIORITY_SPLIT_SHARD, because
priority inversion happens within priorities in the same band.
@xumengpanda xumengpanda requested a review from jzhou77 July 19, 2019 22:25
@xumengpanda
Copy link
Contributor Author

Can you provide an example case where the priority inversion can happen?

The priority band is calculated by the priority / 100.
Each priority band has some amount of budget to move data in parallel.
If we put redundant team priority into the same band with merge/split shard priority, removing redundant team can take up the budget and stops the merge/split shard from running. That's how priority inversion happens.

@xumengpanda
Copy link
Contributor Author

Passed 100K random tests.
TODO: Run a local test to make sure the status is correct.

@xumengpanda
Copy link
Contributor Author

The local run without workload looks good.

} else if (highestPriority >= PRIORITY_TEAM_CONTAINS_UNDESIRED_SERVER) {
stateSectionObj["healthy"] = true;
stateSectionObj["name"] = "healthy_removing_server";
stateSectionObj["description"] = "Removing storage server";
Copy link
Contributor

Choose a reason for hiding this comment

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

This message looks confusing/scary. Maybe something like "optimizing team servers"?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is for PRIORITY_TEAM_CONTAINS_UNDESIRED_SERVER which is not touched by this PR.

I'm inclined to keep what it is because undesired server (e.g., the server on the same address with another server) is supposed to be removed.

Resolve the review comment.
@xumengpanda
Copy link
Contributor Author

@fdb-build test windows please

@xumengpanda
Copy link
Contributor Author

@fdb-build test this please

@xumengpanda
Copy link
Contributor Author

@fdb-build test this please

@xumengpanda
Copy link
Contributor Author

@etschannen This PR is ready to be merged.
The only change since our review session is removing the redundant condition in the if-statement.

@etschannen etschannen merged commit 2123fa1 into apple:master Jul 26, 2019
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.

4 participants