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

Make the task termination order deterministic #2265

Merged
merged 1 commit into from Dec 7, 2017

Conversation

Projects
None yet
5 participants
@sungwonh
Contributor

sungwonh commented Jun 16, 2017

This PR adds support for making the task termination order deterministic when scaling down.
Please refer to #2264 for more details. (closes #2264)

@codecov

This comment has been minimized.

Show comment
Hide comment
@codecov

codecov bot Jun 16, 2017

Codecov Report

Merging #2265 into master will decrease coverage by 0.41%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master    #2265      +/-   ##
==========================================
- Coverage   62.08%   61.66%   -0.42%     
==========================================
  Files          49      128      +79     
  Lines        6842    21080   +14238     
==========================================
+ Hits         4248    13000    +8752     
- Misses       2163     6682    +4519     
- Partials      431     1398     +967

codecov bot commented Jun 16, 2017

Codecov Report

Merging #2265 into master will decrease coverage by 0.41%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master    #2265      +/-   ##
==========================================
- Coverage   62.08%   61.66%   -0.42%     
==========================================
  Files          49      128      +79     
  Lines        6842    21080   +14238     
==========================================
+ Hits         4248    13000    +8752     
- Misses       2163     6682    +4519     
- Partials      431     1398     +967
@aaronlehmann

This looks much better, thanks. I've added some comments. Also, can you please add a unit test for this comparator, now that it is becoming a little more complicated?

Show outdated Hide outdated manager/orchestrator/replicated/slot.go
Show outdated Hide outdated manager/orchestrator/replicated/slot.go
@sungwonh

This comment has been minimized.

Show comment
Hide comment
@sungwonh

sungwonh Jun 20, 2017

Contributor

@aaronlehmann Thank you for your feedback. PR is updated!

Contributor

sungwonh commented Jun 20, 2017

@aaronlehmann Thank you for your feedback. PR is updated!

@aaronlehmann

This comment has been minimized.

Show comment
Hide comment
@aaronlehmann

aaronlehmann Jun 20, 2017

Collaborator

LGTM

Thank you for making the changes!

Collaborator

aaronlehmann commented Jun 20, 2017

LGTM

Thank you for making the changes!

@sebastianbinder

This comment has been minimized.

Show comment
Hide comment
@sebastianbinder

sebastianbinder Dec 1, 2017

What's the current state of this PR? Would love to see this feature implemented.

sebastianbinder commented Dec 1, 2017

What's the current state of this PR? Would love to see this feature implemented.

@sungwonh

This comment has been minimized.

Show comment
Hide comment
@sungwonh

sungwonh Dec 1, 2017

Contributor

@nishanttotla
Who else do I need approval from / what is the process left to get this PR merged?

Contributor

sungwonh commented Dec 1, 2017

@nishanttotla
Who else do I need approval from / what is the process left to get this PR merged?

@sebastianbinder

This comment has been minimized.

Show comment
Hide comment
@sebastianbinder

sebastianbinder Dec 1, 2017

@sungwonh I think first of all you need to rebase as there are conflicting files.

sebastianbinder commented Dec 1, 2017

@sungwonh I think first of all you need to rebase as there are conflicting files.

@sungwonh

This comment has been minimized.

Show comment
Hide comment
@sungwonh

sungwonh Dec 1, 2017

Contributor

Rebased!

Contributor

sungwonh commented Dec 1, 2017

Rebased!

@anshulpundir

Minor comments. I'll merge the change once they are addressed @sungwonh

Show outdated Hide outdated manager/orchestrator/replicated/slot.go
@@ -29,7 +29,17 @@ func (is slotsByRunningState) Less(i, j int) bool {
}
}
return iRunning && !jRunning
if iRunning && !jRunning {

This comment has been minimized.

@anshulpundir

anshulpundir Dec 4, 2017

Contributor

Can I also request you to add a high level comment for the Less() function ? thx!

@anshulpundir

anshulpundir Dec 4, 2017

Contributor

Can I also request you to add a high level comment for the Less() function ? thx!

Make the task termination order deterministic
Use Slot number as a tie-breaker

Signed-off-by: Sungwon Han <sungwon.han@navercorp.com>
@sungwonh

This comment has been minimized.

Show comment
Hide comment
@sungwonh

sungwonh Dec 5, 2017

Contributor

@anshulpundir updated according to your comments.

Contributor

sungwonh commented Dec 5, 2017

@anshulpundir updated according to your comments.

@anshulpundir anshulpundir merged commit 6fc872d into docker:master Dec 7, 2017

3 checks passed

ci/circleci Your tests passed on CircleCI!
Details
codecov/project 61.66% (target 0%)
Details
dco-signed All commits are signed

@sungwonh sungwonh deleted the sungwonh:deterministic-scale-down branch Dec 7, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment