File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,6 @@ package sharder
1919import (
2020 "context"
2121 "fmt"
22- "sync"
2322 "time"
2423
2524 "github.com/go-logr/logr"
@@ -31,6 +30,7 @@ import (
3130 "k8s.io/apimachinery/pkg/runtime/schema"
3231 "k8s.io/apimachinery/pkg/types"
3332 "k8s.io/apimachinery/pkg/util/sets"
33+ "k8s.io/apimachinery/pkg/util/wait"
3434 "k8s.io/utils/clock"
3535 "sigs.k8s.io/controller-runtime/pkg/client"
3636 logf "sigs.k8s.io/controller-runtime/pkg/log"
@@ -170,21 +170,21 @@ type workItem struct {
170170
171171func (o * Operation ) ResyncControllerRing (ctx context.Context , log logr.Logger ) error {
172172 var (
173- wg sync. WaitGroup
173+ wg wait. Group
174174 errs = make (chan error )
175175 work = make (chan * workItem , o .Concurrency )
176176 )
177177
178178 // Compile all objects that need to be moved or drained, and add them to the queue.
179179 // The buffer limit of the queue applies backpressure on the work generator (throttling list paging as needed).
180- wg .Go (func () {
180+ wg .Start (func () {
181181 o .compileWorkItemsForRing (ctx , work , errs )
182182 close (work )
183183 })
184184
185185 // read work items from the queue and perform drains/movements with the configured concurrency
186186 for i := 0 ; i < o .Concurrency ; i ++ {
187- wg .Go (func () {
187+ wg .Start (func () {
188188 for o .processNextWorkItem (ctx , log , work , errs ) {
189189 }
190190 })
You can’t perform that action at this time.
0 commit comments