-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add import scheduler and manager #29367
feat: Add import scheduler and manager #29367
Conversation
Signed-off-by: bigsheeper <yihao.dai@zilliz.com>
Signed-off-by: bigsheeper <yihao.dai@zilliz.com>
…2-binlog-reader
…2-binlog-reader
Signed-off-by: bigsheeper <yihao.dai@zilliz.com>
Signed-off-by: bigsheeper <yihao.dai@zilliz.com>
…2-binlog-reader
…2-binlog-reader
Signed-off-by: bigsheeper <yihao.dai@zilliz.com>
…2-binlog-reader
…2-binlog-reader
…2-binlog-reader
…2-binlog-reader
Signed-off-by: bigsheeper <yihao.dai@zilliz.com>
…2-binlog-reader
…2-binlog-reader
…2-binlog-reader
Signed-off-by: bigsheeper <yihao.dai@zilliz.com>
Signed-off-by: bigsheeper <yihao.dai@zilliz.com>
Signed-off-by: bigsheeper <yihao.dai@zilliz.com>
…2-binlog-reader
Signed-off-by: bigsheeper <yihao.dai@zilliz.com>
…2-import-scheduler
Signed-off-by: bigsheeper <yihao.dai@zilliz.com>
rerun ut |
internal/datacoord/import_util.go
Outdated
}) | ||
segmentIDs := task.(*importTask).GetSegmentIDs() | ||
for _, segmentID := range segmentIDs { | ||
segment := meta.GetSegment(segmentID) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do not lock frequently
internal/datacoord/import_util.go
Outdated
} | ||
return int64(progress), internalpb.ImportState_InProgress, "" | ||
return 0, internalpb.ImportJobState_Failed, "unknown import job state" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ImportJobState_None
internal/datacoord/import_checker.go
Outdated
@@ -276,72 +270,61 @@ func (c *importChecker) checkImportState(job ImportJob) { | |||
return | |||
} | |||
c.buildIndexCh <- segmentID // accelerate index building | |||
err = c.meta.UnsetIsImporting(segmentID) | |||
segment := c.meta.GetSegment(segmentID) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minimize the number of calsl of meta.GetSegment
internal/datacoord/import_checker.go
Outdated
} | ||
} | ||
|
||
func (c *importChecker) checkTimeout(jobID int64) { | ||
tasks := c.imeta.GetTaskBy(WithStates(internalpb.ImportState_InProgress), WithJob(jobID)) | ||
func (c *importChecker) checkFailedJob(job ImportJob) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rename to tryFailingTasks
internal/datacoord/import_checker.go
Outdated
|
||
timeoutTime := tsoutil.PhysicalTime(c.imeta.GetJob(jobID).GetTimeoutTs()) | ||
func (c *importChecker) checkTimeout(job ImportJob) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rename to tryTimeoutJob?
Signed-off-by: bigsheeper <yihao.dai@zilliz.com>
Signed-off-by: bigsheeper <yihao.dai@zilliz.com>
…2-import-scheduler
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: bigsheeper, czs007 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
This PR introduces novel managerial roles for importv2: 1. ImportMeta: To manage all the import tasks; 2. ImportScheduler: To process tasks and modify their states; 3. ImportChecker: To ascertain the completion of all tasks and instigate relevant operations. issue: milvus-io#28521 --------- Signed-off-by: bigsheeper <yihao.dai@zilliz.com>
This PR introduces novel managerial roles for importv2:
issue: #28521