runtime: remove storeSandbox at the end of createSandboxFromConfig

Remove storeSandbox() at the end of createSandboxFromConfig(),
because this callchain createSandboxFromConfig -> createContainers
has already calls storeSandbox().
This can improve the startup speed of the container,
even just for a little.

Fixes: #1980

Signed-off-by: Liang Zhou <zhoul110@chinatelecom.cn>
This commit is contained in:
Liang Zhou 2021-06-09 14:32:07 +08:00
parent 16a835e4a0
commit 3130e66d33

View File

@ -120,11 +120,6 @@ func createSandboxFromConfig(ctx context.Context, sandboxConfig SandboxConfig, f
return nil, err return nil, err
} }
// The sandbox is completely created now, we can store it.
if err = s.storeSandbox(ctx); err != nil {
return nil, err
}
return s, nil return s, nil
} }