imbajin commented on code in PR #336:
URL:
https://github.com/apache/incubator-hugegraph-computer/pull/336#discussion_r2422717426
##########
vermeer/apps/master/bl/scheduler_bl.go:
##########
@@ -28,16 +28,58 @@ import (
"github.com/sirupsen/logrus"
)
+/*
+* @Description: ScheduleBl is the scheduler business logic.
+* @Note: This is the main scheduler business logic.
+ */
type ScheduleBl struct {
structure.MutexLocker
- dispatchLocker structure.MutexLocker
- spaceQueue *schedules.SpaceQueue
- broker *schedules.Broker
- startChan chan *structure.TaskInfo
- isDispatchPaused bool
+ // resource management
+ resourceManager *schedules.SchedulerResourceManager
+ // algorithm management
+ algorithmManager *schedules.SchedulerAlgorithmManager
+ // task management
+ taskManager *schedules.SchedulerTaskManager
+ // cron management
+ cronManager *schedules.SchedulerCronManager
+ // start channel for tasks to be started
+ startChan chan *structure.TaskInfo
+ // configurations
+ startChanSize int
+ tickerInterval int
+ softSchedule bool
Review Comment:
**Missing test coverage for critical scheduling logic**
The scheduler is the core component of this PR but there's no comprehensive
test coverage shown for:
1. Priority-based scheduling
2. Dependency resolution
3. Concurrent vs exclusive task handling
4. Edge cases (circular dependencies, resource exhaustion, etc.)
**Required test cases:**
- Test priority ordering with multiple tasks
- Test dependency chain execution order
- Test circular dependency detection
- Test concurrent task limits
- Test resource allocation and release
- Test cron task scheduling and cleanup
- Test worker failure scenarios
- Test race conditions in state transitions
Please add integration tests in the `/test` folder that verify these
scenarios.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]