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

[jormungandr] Use transfer pool #3867

Merged
merged 7 commits into from
Dec 8, 2022
Merged

[jormungandr] Use transfer pool #3867

merged 7 commits into from
Dec 8, 2022

Conversation

xlqian
Copy link
Member

@xlqian xlqian commented Dec 6, 2022

centralize all logics of transfer-computing into class TransferPool in order to ease the implementation of ACCESS_POINT_TRANSFER

Copy link
Contributor

@woshilapin woshilapin left a comment

Choose a reason for hiding this comment

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

Do we have tests around this functionality? It'd be nice to see that there is no regression after this refactorization.

Comment on lines +766 to +768
if section.type != response_pb2.TRANSFER:
continue
transfer_pool.wait_and_complete(section)
Copy link
Contributor

Choose a reason for hiding this comment

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

How about this instead?

Suggested change
if section.type != response_pb2.TRANSFER:
continue
transfer_pool.wait_and_complete(section)
if section.type == response_pb2.TRANSFER:
transfer_pool.wait_and_complete(section)

Copy link
Member Author

@xlqian xlqian Dec 7, 2022

Choose a reason for hiding this comment

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

it's more like a personal choice 😸 I did so coz I hate indentations in codes...

Copy link
Contributor

Choose a reason for hiding this comment

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

It's one more line and the indentation is there anyway 🤷 Let's stop doing Python if indentation is a problem 😛

@xlqian
Copy link
Member Author

xlqian commented Dec 7, 2022

@woshilapin yep, there are a bunch of functional tests around on this feature

@xlqian xlqian merged commit aa98b45 into dev Dec 8, 2022
@xlqian xlqian deleted the refactor_transfer branch December 8, 2022 10:59
@sonarqubecloud
Copy link

sonarqubecloud bot commented Dec 8, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 2 Code Smells

92.9% 92.9% Coverage
0.0% 0.0% Duplication

@woshilapin woshilapin changed the title [Jormungandr] Use transfer pool [jormungandr] Use transfer pool Dec 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants