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

2.8 - Enhance state.Space -> network.SpaceInfo Conversion Performance #11606

Merged
merged 1 commit into from May 19, 2020

Conversation

manadart
Copy link
Member

Description of change

This patch ensures that when materialising network.SpaceInfo[s] from state types, we retrieve subnets in an efficient manner.

The Space.Subnets method potentially hits the DB multiple times to get explicit space subnets and implied space fan overlays. Avoiding it, especially in a loop for state.AllSpaceInfos is a performance win.

QA steps

Unit tests verify that there is no change in the behaviour of Space.NetworkSpace or State.AllSpaceInfos.

Documentation changes

None.

Bug reference

N/A

@manadart
Copy link
Member Author

Copy link
Member

@SimonRichardson SimonRichardson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lovely 👍

Space.AllSpaceInfos.

This will be faster than using Space.Subnets, which hits the DB multiple
times when there are any subnets in the space.
@manadart
Copy link
Member Author

$$merge$$

@jujubot jujubot merged commit f25d70b into juju:2.8 May 19, 2020
@manadart manadart deleted the 2.8-allspaceinfos-perf branch May 19, 2020 11:16
jujubot added a commit that referenced this pull request May 28, 2020
#11637

## Description of change

Cherry picked commits constituting the following patches:
- #11570
- #11606 
- #11608 

These are performance enhancements around the frequency of database access when materialising space information via `network.AllSpaceInfos`.
jujubot added a commit that referenced this pull request May 29, 2020
#11642

Forward Port:
- Increment juju to 2.8-rc3 #11603
- Version updated to 2.8.1 #11605
- 2.8 - Enhance state.Space -> network.SpaceInfo Conversion Performance #11606 
- Add an acceptance test for CharmRevisionUpdater instead of flakey "unit" test #11609
- 2.8 - Add GetByHardwareAddress to InterfaceInfos #11607
- CAASOperator tests race condition #11610
- Test speedup - fast insecure KeyProfile for testing #11616
- Remove JujuConnSuite from some api tests #11615
- [2.8] Enhance manual machine cleanup script #11618
- [2.8] All space infos backport #11622
- Multi-arch docker image build support #11623 
- 2.8 - Backport Uniter Test Race Fix #11625
- 2.8 - Use Up-To-Date Charm for Branches Integration Test #11626
- Lift leader pinning API to be a member #11628
- [2.8] Bindings constraints for space topology #11621
- Introduces centralised SNI tls getter. #11612
- Muxhttp server tests for worker #11629
- 2.7 - Remove Machine Series Upgrade Lock #11620
- Migrating a model from an old controller with incomplete endpoint bin… #11630
- Add support for bootstrapping to EKS; #11614
- Add 2.7.7 upgrade step to re-run ReplaceSpaceNameWithIDEndpointBindings #11633
- Ensure relation members in uniter data model are not nil #11634
- CMR relation remove #11627
- 2.8-rc Performance Enhancements Ported from 2.8 #11637
- Refactor leadership pinning API #11631
- Merge 2.7 2020528 #11636
- Port stickupkid/unpin machine applications on destroy #11641
- Merge 2.8-rc branch #11640
- Clean up more package level loggers. #11635

Conflicts:
- core/network/nic.go
- core/network/nic_test.go
- scripts/win-installer/setup.iss
- snap/snapcraft.yaml
- version/version.go
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants