mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-09-07 17:15:56 +00:00
change read lock to write lock
This commit is contained in:
parent
73b9d9fd85
commit
c7c1be6813
2 changed files with 2 additions and 4 deletions
|
|
@ -901,9 +901,7 @@ func (j *ResizeJob) setState(state string) {
|
|||
// Run distributes ResizeInstructions.
|
||||
func (j *ResizeJob) Run() error {
|
||||
// Set job state to RUNNING.
|
||||
j.mu.RLock()
|
||||
j.setState(ResizeJobStateRunning)
|
||||
j.mu.RUnlock()
|
||||
j.SetState(ResizeJobStateRunning)
|
||||
|
||||
// Job can be considered done in the case where it doesn't require any action.
|
||||
if !j.urisArePending() {
|
||||
|
|
|
|||
|
|
@ -160,7 +160,7 @@ func (t *TestCluster) AddNode(saveTopology bool) error {
|
|||
return err
|
||||
}
|
||||
|
||||
// Wait for the NodeAdd job to finish.
|
||||
// Wait for the AddNode job to finish.
|
||||
if c.State != pilosa.ClusterStateNormal {
|
||||
t.resizeDone = make(chan struct{})
|
||||
<-t.resizeDone
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue