Skip to content

Fix layout xml and page layout caching issue on redis cluster under high load #22766

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

Closed
wants to merge 1 commit into from
Closed

Fix layout xml and page layout caching issue on redis cluster under high load #22766

wants to merge 1 commit into from

Conversation

andrey-legayev
Copy link
Contributor

@andrey-legayev andrey-legayev commented May 7, 2019

Description (*)

Bugs which were fixed:

  • $this->pageLayout was not checked after reading from cache, but was used as is
  • two cache items were used in once place instead of one (performance impact)

Changes:

  • replace 2 cache items by 1 - it should improve performance
  • add "_MERGED" to cache key suffix to have compatibility with old cache keys during deployment of new version

Fixed Issues (if relevant)

  1. Layout corruption with php-fpm (a Magento 1 problem returns) #6942 Layout corruption (Title is wrong, but issue is real)
  2. Corrupt layout cache causes white page on customer account login #22976 Corrupt layout cache causes white page on customer account login

Manual testing scenarios (*)

N/A

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds on Travis CI are green)

@m2-assistant
Copy link

m2-assistant bot commented May 7, 2019

Hi @andrey-legayev. Thank you for your contribution
Here is some useful tips how you can test your changes using Magento test environment.
Add the comment under your pull request to deploy test or vanilla Magento instance:

  • @magento-engcom-team give me test instance - deploy test instance based on PR changes
  • @magento-engcom-team give me 2.3-develop instance - deploy vanilla Magento instance

For more details, please, review the Magento Contributor Assistant documentation

Copy link
Contributor

@orlangur orlangur left a comment

Choose a reason for hiding this comment

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

After changes are applied and all builds are green, please squash them into a single commit so that we have perfectly clean history 😉

@magento-engcom-team
Copy link
Contributor

Hi @ihor-sviziev, thank you for the review.
ENGCOM-5079 has been created to process this Pull Request

@magento-engcom-team
Copy link
Contributor

Hi @orlangur, thank you for the review.
ENGCOM-5079 has been created to process this Pull Request

Copy link
Contributor

@orlangur orlangur left a comment

Choose a reason for hiding this comment

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

After changes are applied and all builds are green, please squash them into a single commit so that we have perfectly clean history 😉

@andrey-legayev
Copy link
Contributor Author

andrey-legayev commented May 8, 2019

Why can't you apply pull requests with "merge squash" option? I saw it in other github repositories.

@orlangur
Copy link
Contributor

orlangur commented May 8, 2019

@andrey-legayev I suggested it already, there were some concerns regarding commits authorship from EngCom guys. So for now should do it manually.

@ghost ghost assigned VladimirZaets May 10, 2019
@magento-engcom-team
Copy link
Contributor

Hi @orlangur, thank you for the review.
ENGCOM-5079 has been created to process this Pull Request

@andrey-legayev
Copy link
Contributor Author

I reviewed all reports of Static Tests build / Static tests for CE.
I did not touch those problematic lines of code.
Can this pull request be approved?

@xmav
Copy link
Contributor

xmav commented May 22, 2019

@VladimirZaets, @orlangur Can static tests failures be approved taking into account
magento/devdocs#4425 ?

Copy link
Contributor

@orlangur orlangur left a comment

Choose a reason for hiding this comment

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

@andrey-legayev static tests are now fixed, but changes must be squashed.

@andrey-legayev
Copy link
Contributor Author

@andrey-legayev static tests are now fixed, but changes must be squashed.

I have only one commit in this pull request. The rest belong to @xmav

@orlangur
Copy link
Contributor

@andrey-legayev sure, just squash all changes under your single commit. If you don't feel so, there could be a second squashed commit by @xmav but I don't see a reason to do so.

@xmav
Copy link
Contributor

xmav commented May 28, 2019

Fill free to squash all changes under single commit

commit 8ba60263e9ad5e822b7b7efc1b25044083156778
Author: Maksym Aposov <[email protected]>
Date:   Wed May 22 18:28:50 2019 -0500

    Fix layout xml and page layout caching issue on redis cluster under high load

    -Fixed static tests

commit 8112423572d913a72cc41516cb82739a3e2cf2d8
Author: Maksym Aposov <[email protected]>
Date:   Wed May 22 18:27:54 2019 -0500

    Fix layout xml and page layout caching issue on redis cluster under high load

    -Fixed static tests

commit 9406be5d973b4d797b6eff86179ab83f5bc10f0f
Author: Maksym Aposov <[email protected]>
Date:   Wed May 22 13:38:09 2019 -0500

    Fix layout xml and page layout caching issue on redis cluster under high load

    -Fixed static tests

commit f637c2258c6c8f0cc71d1726da18ae652a85791f
Author: Andrey Legayev <[email protected]>
Date:   Thu May 16 15:48:03 2019 +0300

    Fix layout xml and page layout caching issue on redis cluster under high load

    Bugs which were fixed:
     - $this->pageLayout was not checked after reading from cache, but was used as is
     - two cache items were used in once place instead of one (performance impact)

    Changes:
     - replace 2 cache items by 1 - it should improve performance
     - add "_MERGED" to cache key suffix to have compatibility with old cache keys during deployment of new version
@andrey-legayev
Copy link
Contributor Author

Squashed. I hope this is last squash in this PR...

@magento-engcom-team
Copy link
Contributor

Hi @orlangur, thank you for the review.
ENGCOM-5079 has been created to process this Pull Request

@VasylShvorak
Copy link
Contributor

✔️ QA passed

@ghost
Copy link

ghost commented Jun 19, 2019

@magento-cicd2 unfortunately, only members of the maintainers team are allowed to unassign developers from the pull request

@andrey-legayev
Copy link
Contributor Author

andrey-legayev commented Jun 27, 2019

This fix has been already included into v2.3.2 by cherry-picking commit b65ff72.
I'm closing pull request.

@m2-assistant
Copy link

m2-assistant bot commented Jun 27, 2019

Hi @andrey-legayev, thank you for your contribution!
Please, complete Contribution Survey, it will take less than a minute.
Your feedback will help us to improve contribution process.

@andrey-legayev andrey-legayev deleted the layout-cache-fix-2.3-dev branch September 22, 2019 16:08
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.

9 participants