clusterpedia-io/clusterpedia

make synchromanager worker configurable

Closed this issue · 6 comments

What would you like to be added?

  1. Add option WorkerNumber for clustersynchro-manager such as
WorkerNumber int          // WorkerNumber is the number of worker goroutines
  1. change the code from synchromanager.Run(1, ctx.Done()) to synchromanager.Run(c.WorkerNumber, ctx.Done()) in
    pkg/synchromanager/clustersynchro_manager.go
  2. If the WorkerNumber is less than or equal to 0, we should set the default value to 3.

Why is this needed?

Now the worker goroutine number for the cluster synchronization controller in clustersynchro manager is hardcode to 1, which results in the cluster init will become slowly if the user joined too many clusters. Therefore, the worker goroutine number should be configurable.

Hi @cleverhu,
Thanks for opening an issue!
We will look into it as soon as possible.

Details

Instructions for interacting with me using comments are available here.
If you have questions or suggestions related to my behavior, please file an issue against the gh-ci-bot repository.

/kind good-first-issue

@cleverhu

Failed add label kind/good-first-issue
Details

Instructions for interacting with me using comments are available here.
If you have questions or suggestions related to my behavior, please file an issue against the gh-ci-bot repository.

/assign

@wlp1153468871 If there are any questions we can discuss together.

@wlp1153468871 If there are any questions we can discuss together.

I'm a bit busy recently, I'll deal with it on weekends.Thanks.