mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-09-15 08:41:02 +00:00
1. modify unprotectedGenerateResizeJob to return early iif resizing job
not null
This commit is contained in:
parent
eb73042e82
commit
93b6adbf65
1 changed files with 3 additions and 3 deletions
|
|
@ -1195,6 +1195,9 @@ func (c *cluster) listenForJoins() {
|
|||
// for future lookup by JobID.
|
||||
func (c *cluster) unprotectedGenerateResizeJob(nodeAction nodeAction) (*resizeJob, error) {
|
||||
c.logger.Printf("generateResizeJob: %v", nodeAction)
|
||||
if c.currentJob != nil {
|
||||
return nil, fmt.Errorf("there is currently a resize job running")
|
||||
}
|
||||
|
||||
j, err := c.unprotectedGenerateResizeJobByAction(nodeAction)
|
||||
if err != nil {
|
||||
|
|
@ -1206,9 +1209,6 @@ func (c *cluster) unprotectedGenerateResizeJob(nodeAction nodeAction) (*resizeJo
|
|||
c.jobs[j.ID] = j
|
||||
|
||||
// Set job as currentJob.
|
||||
if c.currentJob != nil {
|
||||
return nil, fmt.Errorf("there is currently a resize job running")
|
||||
}
|
||||
c.currentJob = j
|
||||
|
||||
return j, nil
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue