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

kvserver: support checking allocator action and target by range #92176

Closed

Conversation

AlexTalks
Copy link
Contributor

@AlexTalks AlexTalks commented Nov 19, 2022

Adds support for using the allocator to compute the action, if any,
needed to "repair" the range and, if the action requires a replica
addition (including replacements), the target of that addition. This can
be checked by using the new CheckRangeAction(..) function as part of a
store's replicate queue, and can use the default store pool or an
override store pool, so that potential states can be evaluated prior to
transition to those states. As such, this feature adds support for
allocator action and target validation prior to decommission, in order
to support decommission pre-checks.

While this is similar to the replicate queue's PlanOneChange(..), this
new check supports evaluation based on a range descriptor, rather than
an individual replica.

Depends on #91941

Part of #91570.

Release note: None

@cockroach-teamcity
Copy link
Member

This change is Reviewable

@AlexTalks AlexTalks force-pushed the dpf_check_range_action branch from 3885529 to cf91f87 Compare November 23, 2022 04:29
AlexTalks added a commit to AlexTalks/cockroach that referenced this pull request Nov 23, 2022
This change exposes support via a store for checking the allocator
action and upreplication target (if applicable) for any range descriptor.
The range does not need to have a replica on the given store, nor is it
required to evaluate given the current state of the cluster (i.e. the
store's configured `StorePool`), as a node liveness override can be
provided in order to evaluate possible future states.

Depends on cockroachdb#92176.

Part of cockroachdb#91570.

Release note: None
@AlexTalks AlexTalks force-pushed the dpf_check_range_action branch from cf91f87 to ec01301 Compare December 15, 2022 04:27
@AlexTalks AlexTalks marked this pull request as ready for review December 15, 2022 04:28
@AlexTalks AlexTalks requested a review from a team as a code owner December 15, 2022 04:28
@AlexTalks AlexTalks force-pushed the dpf_check_range_action branch from ec01301 to 46f13fb Compare December 15, 2022 19:53
AlexTalks added a commit to AlexTalks/cockroach that referenced this pull request Dec 17, 2022
This change exposes support via a store for checking the allocator
action and upreplication target (if applicable) for any range descriptor.
The range does not need to have a replica on the given store, nor is it
required to evaluate given the current state of the cluster (i.e. the
store's configured `StorePool`), as a node liveness override can be
provided in order to evaluate possible future states.

Depends on cockroachdb#92176.

Part of cockroachdb#91570.

Release note: None
AlexTalks added a commit to AlexTalks/cockroach that referenced this pull request Dec 17, 2022
This change exposes support via a store for checking the allocator
action and upreplication target (if applicable) for any range descriptor.
The range does not need to have a replica on the given store, nor is it
required to evaluate given the current state of the cluster (i.e. the
store's configured `StorePool`), as a node liveness override can be
provided in order to evaluate possible future states.

Depends on cockroachdb#92176.

Part of cockroachdb#91570.

Release note: None
This change adds methods to be to evaluate allocator actions and targets
utilizing a passed-in `StorePool` object, allowing for the allocator to
consider potential scenarios rather than those simply based on the
current liveness.

Depends on cockroachdb#91461, cockroachdb#91965.

Part of cockroachdb#91570.

Release note: None
Adds support for using the allocator to compute the action, if any,
needed to "repair" the range and, if the action requires a replica
addition (including replacements), the target of that addition. This can
be checked by using the new `CheckRangeAction(..)` function as part of a
store's replicate queue, and can use the default store pool or an
override store pool, so that potential states can be evaluated prior to
transition to those states. As such, this feature adds support for
allocator action and target validation prior to decommission, in order
to support decommission pre-checks.

While this is similar to the replicate queue's `PlanOneChange(..)`, this
new check supports evaluation based on a range descriptor, rather than
an individual replica.

Depends on cockroachdb#91941

Part of cockroachdb#91570.

Release note: None
@AlexTalks AlexTalks force-pushed the dpf_check_range_action branch from 46f13fb to 5c0a795 Compare December 19, 2022 23:37
AlexTalks added a commit to AlexTalks/cockroach that referenced this pull request Dec 19, 2022
This change exposes support via a store for checking the allocator
action and upreplication target (if applicable) for any range descriptor.
The range does not need to have a replica on the given store, nor is it
required to evaluate given the current state of the cluster (i.e. the
store's configured `StorePool`), as a node liveness override can be
provided in order to evaluate possible future states.

Depends on cockroachdb#92176.

Part of cockroachdb#91570.

Release note: None
@AlexTalks
Copy link
Contributor Author

Abandoning in favor of #94114.

@AlexTalks AlexTalks closed this Jan 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants