Skip to content

Commit

Permalink
comments
Browse files Browse the repository at this point in the history
  • Loading branch information
leon-inf committed Jan 17, 2025
1 parent f1017e3 commit b1632cf
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions controllers/apps/shardingdefinition_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,12 @@ func (r *ShardingDefinitionReconciler) validateProvisionNUpdateStrategy(ctx cont
return nil
}

// requireParallelProvision checks whether the provision strategy must be parallel.
//
// If any Vars in the ShardingDefinition have requireAllComponentObjects set to true,
// all sharding components must exist before Vars resolving can proceed. This requirement
// conflicts with a serial provision strategy, where components are created one at a time,
// potentially leading to a logical deadlock.
func (r *ShardingDefinitionReconciler) requireParallelProvision() bool {
requireAll := func(opt *appsv1.MultipleClusterObjectOption) bool {
return opt != nil && opt.RequireAllComponentObjects != nil && *opt.RequireAllComponentObjects
Expand Down

0 comments on commit b1632cf

Please sign in to comment.