mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
fed1b91bb4
This fix is a follow up to the comment:
https://github.com/docker/docker/pull/28717#discussion_r90040589
Currently, the collision checking is done at the last step `Add()` of
plugin creation. However, at this stage the context such as plugin
directories have already been creation. In case of name collision,
rollback is needed which could be expensive.
This fix performs the check at the beginning of CreateFromContext using
GetByName. In this way, collision fails fast and no context creation
or rollback is needed.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
(cherry picked from commit
|
||
---|---|---|
.. | ||
defs.go | ||
store.go | ||
store_test.go |