File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -75,14 +75,14 @@ func (s *Service) validateManagementTopic(ctx context.Context) error {
75
75
// The partition count must be updated after topic validation because the validation process may lead to the
76
76
// creation of new partitions. This can occur when new brokers are added to the cluster.
77
77
func (s * Service ) updatePartitionCount (ctx context.Context ) error {
78
- for {
79
- timer := time .NewTimer (1 * time .Second )
80
- defer timer .Stop ()
78
+ retryTicker := time .NewTicker (1 * time .Second )
79
+ defer retryTicker .Stop ()
81
80
81
+ for {
82
82
select {
83
83
case <- ctx .Done ():
84
84
return ctx .Err ()
85
- case <- timer .C :
85
+ case <- retryTicker .C :
86
86
meta , err := s .getTopicMetadata (ctx )
87
87
if err != nil {
88
88
return fmt .Errorf ("could not get topic metadata while updating partition count: %w" , err )
You can’t perform that action at this time.
0 commit comments