Skip to content
New issue

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

server: update limit using all operators #874

Merged
merged 2 commits into from
Dec 4, 2017
Merged

Conversation

disksing
Copy link
Contributor

@disksing disksing commented Dec 4, 2017

Recalculate limiter.counts using all pending operators so that we do not have to worry about limit and operators are not synchronized.

@@ -386,11 +386,11 @@ func (c *coordinator) removeOperator(op *schedule.Operator) {
c.Lock()
defer c.Unlock()
c.removeOperatorLocked(op)
c.limiter.UpdateCounts(c.operators)
Copy link
Member

@Connor1996 Connor1996 Dec 4, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it should be moved into removeOperatorLocked(), cause other places(such as Line 364) will call removeOperatorLocked() directly

Copy link
Contributor

@nolouch nolouch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@Connor1996 Connor1996 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants