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

[release/1.1] cherry-pick: optimize shim lock in runtime v1 #2765

Merged

Conversation

Random-Liu
Copy link
Member

We also need this fix in release 1.1.

I think this is the last piece for #2709.

Note that the lock location for Create is not updated in this cherry-pick, because:

  1. It is not necessary. Create should be called as the first function, and no other functions will be called at the same time.
  2. It is matches the behavior of shim v2 https://github.com/containerd/containerd/blob/master/runtime/v2/runc/service.go#L226.
  3. In release/1.1, all logic is in proc.New. There is no way for us to add the lock at the same place with bugfix: optimize shim lock in runtime v1 avoid dead lock #2743.

/cc @Ace-Tang

apply lock only around process map of shim service, avoid lock affect
other procs operations.

Signed-off-by: Ace-Tang <aceapril@126.com>
@codecov-io
Copy link

Codecov Report

Merging #2765 into release/1.1 will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff              @@
##           release/1.1    #2765   +/-   ##
============================================
  Coverage        48.99%   48.99%           
============================================
  Files               85       85           
  Lines             7603     7603           
============================================
  Hits              3725     3725           
  Misses            3203     3203           
  Partials           675      675
Flag Coverage Δ
#linux 48.99% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 68a2cbc...345837b. Read the comment docs.

@crosbymichael
Copy link
Member

LGTM

Copy link
Member

@estesp estesp left a comment

Choose a reason for hiding this comment

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

LGTM

@estesp estesp merged commit b337430 into containerd:release/1.1 Nov 6, 2018
@Random-Liu Random-Liu deleted the cherrypick-#2743-release-1.1 branch November 7, 2018 20:36
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

5 participants