-
Notifications
You must be signed in to change notification settings - Fork 946
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
fix synchronous pvc/pv bind error when volcano schedule pod with pvc #2844
fix synchronous pvc/pv bind error when volcano schedule pod with pvc #2844
Conversation
return | ||
} | ||
bindTasks := make([]*schedulingapi.TaskInfo, len(successfulTasks)) | ||
copy(bindTasks, successfulTasks) |
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.
Please replace the extra tab with two spaces, which may be better,because the tab size settings vary among different editors
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.
ok, I should have solved this problem 。
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.
Please replace the extra tab with two spaces, which may be better,because the tab size settings vary among different editors
volcano uses tabs if you take a close look at the code🤣
a2c5a5c
to
2e10433
Compare
pkg/scheduler/cache/cache.go
Outdated
sc.VolumeBinder.RevertVolumes(task, task.PodVolumes) | ||
sc.resyncTask(task) | ||
} | ||
func (sc *SchedulerCache) Bind(taskArray []*schedulingapi.TaskInfo) error { |
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.
What is the reason for Volcano's original asynchronous binding, performance?
Does the modification to synchronous have any impact on performance?
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.
ok,here The reason which change asynchronous to synchronous is I have move the asynchronous to above little , so here is not need
4fec262
to
f6098be
Compare
pkg/scheduler/cache/cache.go
Outdated
} else { | ||
successfulTasks = append(successfulTasks, task) | ||
klog.V(5).Infof("task %s/%s bind Volumes done", task.Namespace, task.Name) | ||
func (sc *SchedulerCache) BindTask(bindCache []*schedulingapi.TaskInfo) { |
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.
why we have to add bindcache parameter.
@gj199575 please enable the batch bind and have a test. |
pkg/scheduler/cache/cache.go
Outdated
klog.V(5).Infof("batch bind task count %d", len(bindCache)) | ||
var tmpBindCache []*schedulingapi.TaskInfo = make([]*schedulingapi.TaskInfo, len(bindCache)) | ||
copy(tmpBindCache, bindCache) | ||
go func(bindCacheParam []*schedulingapi.TaskInfo, sc *SchedulerCache) { |
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.
suggest change bindCacheParam
to tasks
Signed-off-by: gj199575 <409237405@qq.com>
f6098be
to
7223f96
Compare
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.
/lgtm
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: william-wang 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 solve #2843