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
Add a ReplicaMovementStrategy that prioritizes (At/Under)MinISR partitions with offline replicas #1559
Conversation
…tions with offline replicas
...a/com/linkedin/kafka/cruisecontrol/executor/strategy/PostponeUrpReplicaMovementStrategy.java
Outdated
Show resolved
Hide resolved
...ontrol/src/test/java/com/linkedin/kafka/cruisecontrol/executor/ExecutionTaskPlannerTest.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks for the feature, Efe!
I left some comments, but shouldn't be merge blockers.
partitions.add(generatePartitionInfo(_partitionMovement4, false)); | ||
|
||
Cluster expectedCluster = new Cluster(null, _expectedNodes, partitions, Collections.<String>emptySet(), Collections.<String>emptySet()); | ||
// This ensures that the _partitionMovement1 and _partitionMovement3 are AtMinISR, while the other partitions are not. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we want to add a test for UnderMinISR is prioritized before AtMinISR partitions?
I am a little hesitant because I don't see a quick way to add this without involving 3 replicas in the replica set.
…tions with offline replicas (linkedin#1559)
…tions with offline replicas (linkedin#1559)
…tions with offline replicas (linkedin#1559)
…tions with offline replicas (linkedin#1559)
This PR resolves #1558.
TopicMinIsrCache#minIsrWithTimeByTopic()
return a snapshot within asynchronized
block to ensure proper synchronization.StrategyOptions
to move any options intended to be used during application of a replica movement strategy. The existing code was limited toCluster
as the sole option, and didn't allow adding new options to a replica movement strategy without an API change inReplicaMovementStrategy
interface. WithStrategyOptions
new options can be added w/o changing the API.BaseReplicaMovementStrategy
to the default replica movement task strategy while creating anExecutionTaskPlanner
object. The redundancy was due to lack of check for the configureddefault.replica.movement.strategies
. If the config had a list of entries containingBaseReplicaMovementStrategy
(i.e. this is the default config), then the existing was still chaining an extraBaseReplicaMovementStrategy
, causing inefficiency for no reason.ExecutionUtils#populateMinIsrState
function to control whether to retrieve (At/Under)MinISR partitions each containing at least an offline replica, or to retrieve (At/Under)MinISR partitions without any offline replicas.PrioritizeMinIsrWithOfflineReplicasStrategy
strategy, then minISR-based concurrency adjustment is enabled. Otherwise, thePrioritizeMinIsrWithOfflineReplicasStrategy
strategy is just a no-op.default.replica.movement.strategies
fromAnalyzer Configurations
-- it is already documented in the correct section (i.e.Executor Configurations
)