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

List Networks need not pull all the endpoints #30673

Merged
merged 1 commit into from Feb 4, 2017

Conversation

@mavenugo
Contributor

mavenugo commented Feb 2, 2017

Pulling all the endpoints is a very resource heavy operation especially
for Global-scoped networks with a backing KVStore. Such heavy operations
can be fetched for individual network inspect. These are unneccessary
for a simple network list operation.

Signed-off-by: Madhu Venugopal madhu@docker.com

@cpuguy83

LGTM

@vdemeester

LGTM 🐸

@thaJeztah thaJeztah added this to the 1.13.1 milestone Feb 2, 2017

@thaJeztah

This comment has been minimized.

Show comment
Hide comment
@thaJeztah

thaJeztah Feb 2, 2017

Member

Looks like this is a change to the API though 😞

Member

thaJeztah commented Feb 2, 2017

Looks like this is a change to the API though 😞

@cpuguy83

This comment has been minimized.

Show comment
Hide comment
@cpuguy83

cpuguy83 Feb 2, 2017

Contributor

I'm going to pull this off merge, because the change indeed needs to be addressed in some way.

Contributor

cpuguy83 commented Feb 2, 2017

I'm going to pull this off merge, because the change indeed needs to be addressed in some way.

@mavenugo

This comment has been minimized.

Show comment
Hide comment
@mavenugo

mavenugo Feb 2, 2017

Contributor

@cpuguy83 @thaJeztah i think the original implementation is a bug and we are fixing it the correct way here. I have seen other bugs filed for the exact same issue (I will point them when i find it). Also the inspect APIs are available to get the data. I don't think this change is going to break most of the users.

Contributor

mavenugo commented Feb 2, 2017

@cpuguy83 @thaJeztah i think the original implementation is a bug and we are fixing it the correct way here. I have seen other bugs filed for the exact same issue (I will point them when i find it). Also the inspect APIs are available to get the data. I don't think this change is going to break most of the users.

@vdemeester

This comment has been minimized.

Show comment
Hide comment
@vdemeester

vdemeester Feb 2, 2017

Member

@mavenugo true, but this might break people and we should follow a depreciation policy as we do usually. We need, at least, to version this change (so using the same API version endpoint give the same result)

Member

vdemeester commented Feb 2, 2017

@mavenugo true, but this might break people and we should follow a depreciation policy as we do usually. We need, at least, to version this change (so using the same API version endpoint give the same result)

@mavenugo

This comment has been minimized.

Show comment
Hide comment
@mavenugo

mavenugo Feb 3, 2017

Contributor

@vdemeester @thaJeztah @cpuguy83 @tiborvass Added the version check. PTAL.

Contributor

mavenugo commented Feb 3, 2017

@vdemeester @thaJeztah @cpuguy83 @tiborvass Added the version check. PTAL.

List Networks need not pull all the endpoints
Pulling all the endpoints is a very resource heavy operation especially
for Global-scoped networks with a backing KVStore. Such heavy operations
can be fetched for individual network inspect. These are unneccessary
for a simple network list operation.

Signed-off-by: Madhu Venugopal <madhu@docker.com>
@mavenugo

This comment has been minimized.

Show comment
Hide comment
@mavenugo

mavenugo Feb 3, 2017

Contributor

@tiborvass done changing the function name. ptal.

Contributor

mavenugo commented Feb 3, 2017

@tiborvass done changing the function name. ptal.

} else {
nr = n.buildNetworkResource(nw)
}
list = append(list, *nr)
}
list, err = filterNetworks(list, netFilters)

This comment has been minimized.

@thaJeztah

thaJeztah Feb 3, 2017

Member

As a follow up, it may be worth considering to add information not needed for filtering until after the networks have been filtered.

Perhaps create utility functions to append information such as containers and peers (e.g. appendEndpointInfo(list), appendPeerInfo(list))

@thaJeztah

thaJeztah Feb 3, 2017

Member

As a follow up, it may be worth considering to add information not needed for filtering until after the networks have been filtered.

Perhaps create utility functions to append information such as containers and peers (e.g. appendEndpointInfo(list), appendPeerInfo(list))

@thaJeztah

left a suggestion for possible improvement (follow up), but LGTM on this one

@tiborvass LGTY?

@tiborvass

This comment has been minimized.

Show comment
Hide comment
@tiborvass

tiborvass Feb 4, 2017

Collaborator

LGTM

Collaborator

tiborvass commented Feb 4, 2017

LGTM

@tiborvass tiborvass merged commit 4dbc105 into moby:master Feb 4, 2017

4 checks passed

dco-signed All commits are signed
experimental Jenkins build Docker-PRs-experimental 30303 has succeeded
Details
janky Jenkins build Docker-PRs 38917 has succeeded
Details
windowsRS1 Jenkins build Docker-PRs-WoW-RS1 9966 has succeeded
Details

@GordonTheTurtle GordonTheTurtle added this to the 1.14.0 milestone Feb 4, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment