sectorstorage: Missing unlock in waitWork
This commit is contained in:
parent
ea5bb5cdab
commit
c6b03ce62b
1
extern/sector-storage/manager_calltracker.go
vendored
1
extern/sector-storage/manager_calltracker.go
vendored
@ -271,6 +271,7 @@ func (m *Manager) waitWork(ctx context.Context, wid WorkID) (interface{}, error)
|
|||||||
res, ok := m.results[wid]
|
res, ok := m.results[wid]
|
||||||
if ok {
|
if ok {
|
||||||
done()
|
done()
|
||||||
|
m.workLk.Unlock()
|
||||||
return res.r, res.err
|
return res.r, res.err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
3
extern/sector-storage/manager_test.go
vendored
3
extern/sector-storage/manager_test.go
vendored
@ -296,6 +296,9 @@ func TestRestartManager(t *testing.T) {
|
|||||||
require.NoError(t, err)
|
require.NoError(t, err)
|
||||||
|
|
||||||
require.Equal(t, 1, tw.pc1s)
|
require.Equal(t, 1, tw.pc1s)
|
||||||
|
|
||||||
|
ws := m.WorkerJobs()
|
||||||
|
require.Empty(t, ws)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user