Skip to content
This repository was archived by the owner on Mar 31, 2023. It is now read-only.

Conversation

@kevin-zhonghao
Copy link
Contributor

@kevin-zhonghao kevin-zhonghao commented Aug 14, 2020

Bug Description
The creation of vpc will take a long time (avg about 0.8s), and the time will increase as the amount of data in the database increases.

Proposed Solution
We found that the process of creating vxlan took a lot of time, so I replaced repo.findAllItems() in addVxlanEntity() method with repo.findItem() and set up partition as the key of the map in cache.

@xieus xieus requested review from haboy52581 and xieus August 14, 2020 23:40
@xieus xieus added the perf testing Performance Testing label Aug 14, 2020
@xieus xieus added this to the Version 0.8.2020.08.30 milestone Aug 14, 2020
@xieus xieus changed the title Fix/create vpc long time [VPC Mgr] Fix VPC Creation Performance Issue Aug 17, 2020
@xieus
Copy link
Contributor

xieus commented Aug 17, 2020

@kevin-zhonghao In this PR description, can you detail the issue and how you fix it?

Some recommended format like the following, which was how I edited the previous PR so I would like you to practice it as well :-)

Bug Description
XXX

Proposed Solution
YYY

Copy link
Contributor

@xieus xieus left a comment

Choose a reason for hiding this comment

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

Look pretty good. I left a few more minor comments. Please take a look.


key = networkGRERange.allocateKey();
cache.put(networkGRERange.getId(), networkGRERange);
if (!key.equals(ConstantsConfig.keyNotEnoughReturnValue)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Recommend to put this check into a util method which could be used for other extended validation, not only checking keyNotEnoughReturnValue.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah that's right ~ but we could make this change when we have other extended validation later, what do you think

Copy link
Contributor

Choose a reason for hiding this comment

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

Sure.

@xieus
Copy link
Contributor

xieus commented Aug 19, 2020

@kevin-zhonghao This PR has some conflicting files with your other PR #353 that just got merged to master. Should be a minor fix. Pls take a look.

# Conflicts:
#	services/vpc_manager/src/main/java/com/futurewei/alcor/vpcmanager/controller/SegmentController.java
#	services/vpc_manager/src/test/java/com/futurewei/alcor/vpcmanager/SegmentControllerTests.java
@xieus xieus self-requested a review August 20, 2020 23:11
Copy link
Contributor

@xieus xieus left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks for continuing tuning the performance.

@xieus xieus merged commit 355b799 into futurewei-cloud:master Aug 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

perf testing Performance Testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants