comments
This commit is contained in:
parent
44dca19012
commit
3f24e4d6ca
|
@ -19,8 +19,8 @@ const (
|
|||
// retrieving a handle.
|
||||
retrieveBackoffLimit = 5 * time.Second
|
||||
|
||||
// retrieveFailureLimit is how many times we will attempt to retireve a
|
||||
// handle giving up and potentially leaking resources.
|
||||
// retrieveFailureLimit is how many times we will attempt to retrieve a
|
||||
// new handle before giving up.
|
||||
retrieveFailureLimit = 5
|
||||
)
|
||||
|
||||
|
|
|
@ -102,7 +102,7 @@ func (h *statsHook) collectResourceUsageStats(handle interfaces.DriverStats, sto
|
|||
// We do not log when the plugin is shutdown as this is either:
|
||||
// - A race between the stopCollection channel being closed and
|
||||
// calling Stats on the handle.
|
||||
// = The driver plugin has unexpectedly exited
|
||||
// - The driver plugin has unexpectedly exited
|
||||
//
|
||||
// In either case sleeping and trying again or returning based
|
||||
// on the stop channel is the correct behavior
|
||||
|
|
|
@ -473,7 +473,10 @@ MAIN:
|
|||
tr.logger.Debug("task run loop exiting")
|
||||
}
|
||||
|
||||
// TODO(alex) is this a good return type? Should these be separate methods?
|
||||
// handleTaskExitResult handles the results returned by the task exiting. If
|
||||
// retryWait is true, the caller should attempt to wait on the task again since
|
||||
// it has not actually finished running. This can happen if the driver plugin
|
||||
// has exited.
|
||||
func (tr *TaskRunner) handleTaskExitResult(result *drivers.ExitResult) (retryWait bool) {
|
||||
if result == nil {
|
||||
return false
|
||||
|
@ -776,7 +779,6 @@ func (tr *TaskRunner) Restore() error {
|
|||
return nil
|
||||
}
|
||||
|
||||
// TODO(alex) Is the return optimal?
|
||||
// restoreHandle ensures a TaskHandle is valid by calling Driver.RecoverTask
|
||||
// and sets the driver handle. If the TaskHandle is not valid, DestroyTask is
|
||||
// called.
|
||||
|
|
Loading…
Reference in New Issue