You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current implementation of AnalyzeHighestPriorityTables uses a WaitGroupWrapper to execute analysis jobs concurrently. This approach lacks flexibility in managing running jobs.
Proposed Changes
Implement a dynamic job management system that maintains a constant number of running jobs up to the maximum concurrency limit.
Add functionality to track currently running analysis jobs by table ID.
Allow for dynamic adjustment of concurrency based on the AutoAnalyzeConcurrency parameter.
Replace the WaitGroupWrapper with individual goroutines for each job.
Implementation Details
Add a runningJobs map to the Refresher struct to track active jobs.
Modify AnalyzeHighestPriorityTables to:
Check the current number of running jobs before starting new ones.
Use goroutines for each job instead of a WaitGroupWrapper.
Dynamically start new jobs as others complete, maintaining the desired concurrency.
Implement proper locking mechanisms to ensure thread-safety when managing the job queue and running jobs.
Add a method to get the current running jobs.
Expected Benefits
More efficient use of system resources by maintaining a constant number of running jobs.
Improved flexibility in managing analysis jobs, allowing for better responsiveness to system changes.
Enhanced ability to monitor and control the auto-analyze process.
Prepare for the new priority queue.
The text was updated successfully, but these errors were encountered:
Background
The current implementation of
AnalyzeHighestPriorityTables
uses aWaitGroupWrapper
to execute analysis jobs concurrently. This approach lacks flexibility in managing running jobs.Proposed Changes
AutoAnalyzeConcurrency
parameter.WaitGroupWrapper
with individual goroutines for each job.Implementation Details
runningJobs
map to theRefresher
struct to track active jobs.AnalyzeHighestPriorityTables
to:Use goroutines for each job instead of aWaitGroupWrapper
.Expected Benefits
The text was updated successfully, but these errors were encountered: