-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Optimize QuoteIdToMaskedQuoteId model and fix infinite loop #33324
Optimize QuoteIdToMaskedQuoteId model and fix infinite loop #33324
Conversation
Hi @ihor-sviziev. Thank you for your contribution
❗ Automated tests can be triggered manually with an appropriate comment:
You can find more information about the builds here ℹ️ Please run only needed test builds instead of all when developing. Please run all test builds before sending your PR for review. For more details, please, review the Magento Contributor Guide documentation. 🕙 You can find the schedule on the Magento Community Calendar page. 📞 The triage of Pull Requests happens in the queue order. If you want to speed up the delivery of your contribution, please join the Community Contributions Triage session to discuss the appropriate ticket. 🎥 You can find the recording of the previous Community Contributions Triage on the Magento Youtube Channel ✏️ Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel |
@magento run all tests |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time. |
FYI We have test coverage for this functionality in https://github.com/magento/magento2/blob/f4db7d458884bcfc3d21b35b41f4fbe8e91bcb0f/dev/tests/integration/testsuite/Magento/Quote/Model/QuoteIdToMaskedQuoteIdTest.php I think it's good enough to mark this PR with a "covered" label. |
@magento run all tests |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time. |
@magento run Magento Health Index |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time. |
@magento run Integration Tests |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time. |
4c66569
to
cb1ef06
Compare
@magento run all tests |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time. |
@magento run Integration Tests, WebAPI Tests |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good 👍
Hi @eduard13, thank you for the review. |
✔️ QA Passed Preconditions:
Manual testing scenario:
Before: ✖️ Request was responding with server error response as shown in below screenshot (It is slightly different that what shown in the above issue description) After: ✔️ Responding with proper cart details There is no additional testing is requited since it is a API request issue on a particular case. Also there is Auto Test - covered and hence no additional regression is required to it. |
@magento convert to patch for 2.4.3-p1 |
@magento convert to patch for 2.4.3 |
@ihor-sviziev changes has been successfully converted for 2.4.3 version and pushed to the converted-magento-magento2-2.4.3 branch. You may submit a pull request using the link: 2.4.3-release...magento:converted-magento-magento2-2.4.3 |
@ihor-sviziev changes has been successfully converted for 2.4.3 version and pushed to the converted-magento-magento2-2.4.3 branch. You may submit a pull request using the link: 2.4.3-release...magento:converted-magento-magento2-2.4.3 |
Description (*)
This PR stops using cart repository and using tiny code that checks only if such a quote exists.
I compared the same request w/o and with changes from PR and got ~40% time response improvement (tested with Blackfire):
Also, it fixes the infinite loop described in #33675, as the logic was rewritten to small SQL queries.
Related Pull Requests
Fixed Issues (if relevant)
Manual testing scenarios (*)
Questions or comments
Contribution checklist (*)