If you are talking about a race condition to the same docker (cluster), it does not make a difference whether plugin is in same JVM or not. Docker server side handles container creation atomically. Also Docker will make throws an exception if there is a container already running with the same name/id. Which will return a error JSON from the plugin.
On Sun, Jul 31, 2016 at 3:11 PM, Alan Williams <[email protected]> wrote: > On 31-Jul-16 08:47, Nadeesh Dilanga wrote: > >> Hi, >> Related to the validation piece, forgot to mention that Activity plugin >> already checks those validations before it runs even now. ex: if I try to >> start an already started container, it gives me a json response mentioning >> the container already started. >> > > I think that is reasonable. An alternative approach would be to take the > running container. That, though, could lead to problems. What will happen > if I try to run two instances of the activity at the same time i.e. same > container. We will need to ensure that any conflict is prevented. > > Alan > > >
