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

bugfix: update SafeMap item just call Put, no need call Remove #1175

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions daemon/mgr/container.go
Original file line number Diff line number Diff line change
Expand Up @@ -1087,9 +1087,6 @@ func (mgr *ContainerManager) Upgrade(ctx context.Context, name string, config *t
}

// Upgrade succeeded, refresh the cache
// remove old container from cache
mgr.cache.Remove(c.ID())
// add new container to cache
mgr.cache.Put(c.ID(), c)
}

Expand Down Expand Up @@ -1229,9 +1226,6 @@ func (mgr *ContainerManager) DisconnectContainerFromNetwork(ctx context.Context,
}

// container meta changed, refresh the cache
// remove old container from cache
mgr.cache.Remove(c.ID())
// add new container to cache
mgr.cache.Put(c.ID(), c)

// update container meta json
Expand Down