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

[Issue] Prevent flushing same tags several times #29890

Closed
m2-assistant bot opened this issue Sep 3, 2020 · 2 comments · Fixed by #29885
Closed

[Issue] Prevent flushing same tags several times #29890

m2-assistant bot opened this issue Sep 3, 2020 · 2 comments · Fixed by #29885
Assignees
Labels
Component: Indexer Fixed in 2.4.x The issue has been fixed in 2.4-develop branch Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Priority: P3 May be fixed according to the position in the backlog. Progress: done Reported on 2.4.0 Indicates original Magento version for the Issue report. Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch Severity: S3 Affects non-critical data or functionality and does not force users to employ a workaround.

Comments

@m2-assistant
Copy link

m2-assistant bot commented Sep 3, 2020

This issue is automatically created based on existing pull request: #29885: Prevent flushing same tags several times

Preconditions (*)

  1. Magento 2.4-develop

Description (*)

If a product is saved in admin - changed name, price, stock, weight, added category to product. Then after indexing, the same tags are flushed several times.
Here is an example of default Magento behaviour on cleaning cache tags during indexing (different arrays belong to different indexers cleaning the cache):

root@c119d6a06fcb:/var/www/m2clean$  bin/magento cron:run --group=index --bootstrap=standaloneProcessStarted=1

Array
(
)


Array
(
)


Array
(
    <0] => cat*p*1
    [1] => cat*c*2
    [2] => cat*c*1
    [3] => cat*c*2
    [4] => cat*c*3
    [5] => cat*c*1
)

Array
(
    [0] => cat*p*1
    [1] => cat*c*2
    [2] => cat*c*1
    [3] => cat*c*2
    [4] => cat*c*3
    [5] => cat*c*1
)


Array
(
    [0] => cat*p*1
    [1] => cat*c*2
    [2] => cat*c*1
    [3] => cat*c*2
    [4] => cat*c*3
    [5] => cat*c*1
)


Array
(
    [0] => cat*p*1
)

Array
(
    [0] => cat*p*1
    [1] => cat*p*1
    [2] => cat*p*1
    [3] => cat*p*1
    [4] => cat*c*2
    [5] => cat*c*1
    [6] => cat*c*2
    [7] => cat*c*3
    [8] => cat*c*1
)


Array
(
    [0] => cat*p*1
    [1] => cat*p*1
    [2] => cat*p*1
    [3] => cat*p*1
    [4] => cat*c*2
    [5] => cat*c*1
    [6] => cat*c*2
    [7] => cat*c*3
    [8] => cat*c*1
)

Array
(
    [0] => cat*p*1
    [1] => cat*p*1
    [2] => cat*p*1
    [3] => cat*p*1
    [4] => cat*p*1
    [5] => cat*c*2
    [6] => cat*c*1
    [7] => cat*c*2
    [8] => cat*c*3
    [9] => cat*c*1
)


Array
(
    [0] => cat*p*1
    [1] => cat*p*1
    [2] => cat*p*1
    [3] => cat*p*1
    [4] => cat*p*1
    [5] => cat*c*2
    [6] => cat*c*1
    [7] => cat*c*2
    [8] => cat*c*3
    [9] => cat*c*1
)

Array
(
    [0] => cat*p*1
    [1] => cat*p*1
    [2] => cat*p*1
    [3] => cat*p*1
    [4] => cat*p*1
    [5] => cat*p*1
    [6] => cat*c*2
    [7] => cat*c*1
    [8] => cat*c*2
    [9] => cat*c*3
    [10] => cat*c*1
)


Array
(
    [0] => cat*p*1
    [1] => cat*p*1
    [2] => cat*p*1
    [3] => cat*p*1
    [4] => cat*p*1
    [5] => cat*p*1
    [6] => cat*c*2
    [7] => cat*c*1
    [8] => cat*c*2
    [9] => cat*c*3
    [10] => cat*c*1
)


Array
(
    [0] => cat*p*1
    [1] => cat*p*1
    [2] => cat*p*1
    [3] => cat*p*1
    [4] => cat*p*1
    [5] => cat*p*1
    [6] => cat*c*2
    [7] => cat*c*1
    [8] => cat*c*2
    [9] => cat*c*3
    [10] => cat*c*1
)


Array
(
    [0] => cat*p*1
    [1] => cat*p*1
    [2] => cat*p*1
    [3] => cat*p*1
    [4] => cat*p*1
    [5] => cat*p*1
    [6] => cat*c*2
    [7] => cat*c*1
    [8] => cat*c*2
    [9] => cat*c*3
    [10] => cat*c*1
)


Array
(
    [0] => cat*p*1
    [1] => cat*p*1
    [2] => cat*p*1
    [3] => cat*p*1
    [4] => cat*p*1
    [5] => cat*p*1
    [6] => cat*c*2
    [7] => cat*c*1
    [8] => cat*c*2
    [9] => cat*c*3
    [10] => cat*c*1
)
{code}

Here is the same output with the changes applied:
{code}
root@c119d6a06fcb:/var/www/m2clean$  bin/magento cron:run --group=index --bootstrap=standaloneProcessStarted=1
Array
(
)


Array
(
)


Array
(
    [0] => cat*p*1
    [1] => cat*c*2
    [2] => cat*c*1
    [4] => cat*c*3
)

Array
(
    [0] => cat*p*1
    [1] => cat*c*2
    [2] => cat*c*1
    [4] => cat*c*3
)


Array
(
    [0] => cat*p*1
    [1] => cat*c*2
    [2] => cat*c*1
    [4] => cat*c*3
)


Array
(
    [0] => cat*p*1
)

Array
(
    [0] => cat*p*1
    [4] => cat*c*2
    [5] => cat*c*1
    [7] => cat*c*3
)


Array
(
    [0] => cat*p*1
    [4] => cat*c*2
    [5] => cat*c*1
    [7] => cat*c*3
)

Array
(
    [0] => cat*p*1
    [5] => cat*c*2
    [6] => cat*c*1
    [8] => cat*c*3
)


Array
(
    [0] => cat*p*1
    [5] => cat*c*2
    [6] => cat*c*1
    [8] => cat*c*3
)

Array
(
    [0] => cat*p*1
    [6] => cat*c*2
    [7] => cat*c*1
    [9] => cat*c*3
)

Array
(
    [0] => cat*p*1
    [6] => cat*c*2
    [7] => cat*c*1
    [9] => cat*c*3
)

Array
(
    [0] => cat*p*1
    [6] => cat*c*2
    [7] => cat*c*1
    [9] => cat*c*3
)

Array
(
    [0] => cat*p*1
    [6] => cat*c*2
    [7] => cat*c*1
    [9] => cat*c*3
)


Array
(
    [0] => cat*p*1
    [6] => cat*c*2
    [7] => cat*c*1
    [9> => cat*c*3
)

Steps to reproduce (*)

  1. Go to System - Index Management
  2. Select All Indexers_ and change the _Actions to Update by Schedule
  3. Go to Catalog - Categories, and change the Category Name for at least two Categories, for example
  4. Go to Catalog - Products and change the Price, Quantity, Weight for at least two Products
  5. Run bin/magento cron:run --group=index --bootstrap=standaloneProcessStarted=1
  6. Observe the return of \Magento\Framework\Indexer\CacheContext::getIdentities

Expected result (*)

before

Actual Result (*)

after

@m2-assistant m2-assistant bot added Component: Indexer Priority: P3 May be fixed according to the position in the backlog. Severity: S3 Affects non-critical data or functionality and does not force users to employ a workaround. labels Sep 3, 2020
@ghost ghost assigned siimm Sep 3, 2020
@ghost ghost added this to Ready for QA in Community Backlog Sep 3, 2020
@magento-engcom-team magento-engcom-team added the Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed label Sep 3, 2020
@ghost ghost moved this from Ready for QA to PR In Progress in Community Backlog Sep 3, 2020
siimm added a commit to siimm/magento2 that referenced this issue Sep 4, 2020
@sidolov sidolov added this to Ready for Grooming in Low Priority Backlog Sep 24, 2020
@m2-community-project m2-community-project bot moved this from Ready for Grooming to Pull Request In Progress in Low Priority Backlog Sep 24, 2020
@m2-community-project m2-community-project bot added Progress: PR Created Indicates that Pull Request has been created to fix issue and removed Progress: PR in progress labels Sep 24, 2020
@sidolov sidolov added this to Ready for Grooming in Low Priority Backlog Sep 24, 2020
@m2-community-project m2-community-project bot moved this from Ready for Grooming to Pull Request In Progress in Low Priority Backlog Sep 24, 2020
@m2-community-project m2-community-project bot added Progress: PR Created Indicates that Pull Request has been created to fix issue and removed Progress: PR Created Indicates that Pull Request has been created to fix issue labels Sep 24, 2020
@engcom-Bravo engcom-Bravo added Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed labels Oct 7, 2020
@m2-community-project m2-community-project bot removed the Progress: PR Created Indicates that Pull Request has been created to fix issue label Oct 7, 2020
@magento-engcom-team magento-engcom-team added the Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development label Oct 7, 2020
@magento-engcom-team
Copy link
Contributor

✅ Confirmed by @engcom-Bravo
Thank you for verifying the issue. Based on the provided information internal tickets MC-38268 were created

Issue Available: @engcom-Bravo, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.

@m2-community-project m2-community-project bot moved this from Pull Request In Progress to Ready for Development in Low Priority Backlog Oct 7, 2020
@magento-engcom-team magento-engcom-team added the Fixed in 2.4.x The issue has been fixed in 2.4-develop branch label Oct 7, 2020
@magento-engcom-team
Copy link
Contributor

Hi @m2-assistant[bot]. Thank you for your report.
The issue has been fixed in #29885 by @siimm in 2.4-develop branch
Related commit(s):

The fix will be available with the upcoming 2.4.2 release.

@m2-community-project m2-community-project bot moved this from Ready for Development to Done in Low Priority Backlog Oct 7, 2020
@magento-engcom-team magento-engcom-team added the Reported on 2.4.0 Indicates original Magento version for the Issue report. label Nov 13, 2020
@m2-community-project m2-community-project bot removed this from PR In Progress in Community Backlog Nov 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Indexer Fixed in 2.4.x The issue has been fixed in 2.4-develop branch Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Priority: P3 May be fixed according to the position in the backlog. Progress: done Reported on 2.4.0 Indicates original Magento version for the Issue report. Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch Severity: S3 Affects non-critical data or functionality and does not force users to employ a workaround.
Projects
Development

Successfully merging a pull request may close this issue.

3 participants