We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug if the miner can't add new worker anymore.
Version (run lotus version): v1.4.0 Additional context sector-storage/sched_worker.go func (sh *scheduler) runWorker(ctx context.Context, w Worker) error { info, err := w.Info(ctx) if err != nil { return xerrors.Errorf("getting worker info: %w", err) }
lotus version
sessID, err := w.Session(ctx) if err != nil { return xerrors.Errorf("getting worker session: %w", err) } if sessID == ClosedWorkerID { return xerrors.Errorf("worker already closed") } worker := &workerHandle{ workerRpc: w, info: info, preparing: &activeResources{}, active: &activeResources{}, enabled: true, closingMgr: make(chan struct{}), closedMgr: make(chan struct{}), } wid := WorkerID(sessID) sh.workersLk.Lock() _, exist := sh.workers[wid] if exist { log.Warnw("duplicated worker added", "id", wid) sh.workersLk.Unlock() //****************Gavin adding this line and fix the bug! // this is ok, we're already handling this worker in a different goroutine return nil } sh.workers[wid] = worker sh.workersLk.Unlock()
//... }
The text was updated successfully, but these errors were encountered:
Good catch! Fixed in #5251
Sorry, something went wrong.
No branches or pull requests
Describe the bug
if the miner can't add new worker anymore.
Version (run
lotus version
):v1.4.0
Additional context
sector-storage/sched_worker.go
func (sh *scheduler) runWorker(ctx context.Context, w Worker) error {
info, err := w.Info(ctx)
if err != nil {
return xerrors.Errorf("getting worker info: %w", err)
}
//...
}
The text was updated successfully, but these errors were encountered: