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

Properly release lock on all scale checks #7255

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Lqp1
Copy link

@Lqp1 Lqp1 commented Oct 28, 2020

Scale checks are done regularly, to validate that running instances
number matches expected number of instances in runSpec.

There are two cases:

  • There are missing instances, in that case marathon starts new
    instances
  • There are too many instances, in that case marathon kills overdue
    instances

In second case, lock is supposed to be released only when overdue instances
are dead. We encountered issues where lock was never released because
KillStreamWatKillStreamWatcher.watchForKilledTasks() future was never
ending. This is because of a typo in the code, making it wait for ALL
instances to die, instead of just the overdue subset.

What do you think?

Scale checks are done regularly, to validate that running instances
number matches expected number of instances in runSpec.

There are two cases:
* There are missing instances, in that case marathon starts new
  instances
* There are too many instances, in that case marathon kills overdue
  instances

In second case, lock is supposed to be released only when overdue instances
are dead. We encountered issues where lock was never released because
KillStreamWatKillStreamWatcher.watchForKilledTasks() future was never
ending. This is because of a typo in the code, making it wait for ALL
instances to die, instead of just the overdue subset.
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.

None yet

1 participant