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

Drop indexer changelog tables on mview unsubscribe #25859

Open
wants to merge 26 commits into
base: 2.4-develop
Choose a base branch
from

Conversation

fredden
Copy link
Member

@fredden fredden commented Nov 30, 2019

Description (*)

This pull request will remove the unused changelog tables when changing an index from 'update on schedule' to 'update on save'.

From what I can tell, this was the case before 6ae3c48 was merged. I have tried to avoid any regressions here by marking the index as invalid when dropping the table, to catch any entries which might have otherwise been missed. It seems that 6ae3c48 only protects missed changelog entries if the index is switched back to 'update on schedule'. The change introduced here solves that problem by always performing a full index (via normal minutely cron).

Fixed Issues

Manual testing scenarios (*)

  1. Set indexes to 'update on schedule'
  2. Make a change which will trigger an entry in the changelog table (eg, update product name in admin)
  3. Wait for normal minutely cron to run index
  4. Observe data in version_id column in mview_state table.
  5. Change indexes to 'update on save'
  6. Observe data in version_id column in mview_state table.
  7. Note that all changed indexes are now 'invalid' and will be fully indexed via normal minutely cron.

Questions or comments

I am not confident that I have fully covered all changes here in unit tests. Please may I have some advice as to how I might need to adjust the unit tests to ensure no regressions.

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 are green)

Resolved issues:

  1. resolves [Issue] Drop indexer changelog tables on mview unsubscribe #29789: Drop indexer changelog tables on mview unsubscribe

@m2-assistant
Copy link

m2-assistant bot commented Nov 30, 2019

Hi @fredden. 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 give me test instance - deploy test instance based on PR changes
  • @magento give me 2.3-develop instance - deploy vanilla Magento instance

For more details, please, review the Magento Contributor Guide documentation.

@sidolov sidolov changed the base branch from 2.3-develop to 2.4-develop December 5, 2019 17:05
This fixes a problem where mview gets "stuck" if interrupted, for example
during deployment.
@fredden fredden requested a review from kandy April 18, 2020 13:19
@ihor-sviziev ihor-sviziev self-assigned this Aug 27, 2020
@ihor-sviziev
Copy link
Contributor

@magento run all tests

Copy link
Contributor

@ihor-sviziev ihor-sviziev left a comment

Choose a reason for hiding this comment

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

Hi @fredden,
Could you review and fix failing tests?

@ghost ghost moved this from Pending Review to Changes Requested in Pull Requests Dashboard Aug 28, 2020
@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please message the #magento-devops slack channel if they don't show in a reasonable amount of time and a representative will look into any issues.

@m2-community-project m2-community-project bot moved this from Pending Approval to Review in Progress in Community Dashboard Sep 7, 2023
@engcom-Charlie
Copy link
Contributor

It seems that bot moved this PR to review hence moving it back to Pending Approval.

@engcom-Charlie engcom-Charlie moved this from Review in Progress to Pending Approval in Community Dashboard Sep 7, 2023
@fredden
Copy link
Member Author

fredden commented Mar 1, 2024

@engcom-Charlie, please can you provide an update on this pull request.

@engcom-Echo
Copy link
Contributor

@magento run all tests

@engcom-Echo engcom-Echo moved this from Pending Approval to Ready for Testing in Community Dashboard Mar 20, 2024
@m2-community-project m2-community-project bot moved this from Ready for Testing to Testing in Progress in Community Dashboard Mar 26, 2024
@engcom-Delta
Copy link
Contributor

@magento run all tests

@engcom-Delta
Copy link
Contributor

✔️ QA Passed

Preconditions:

  • Install fresh Magento 2.4-develop

Manual testing scenario:

1.Login to magento admin
2.Go to System - Index Management
3.Select All indexers from Mass Actions and select Update by Schedule from Actions, click submit.
4.The indexers Status is updated, run php bin/magento indexer:status
5.Go to Catalog - Products and Edit an existing Product Name. Save product
6.Run php bin/magento indexer:status
7.Wait for normal minutely cron to run index or run php bin/magento cron:run
8.Check the indexer status php bin/magento indexer:status
9.Go to System - Index Management
10.Select All indexers from Mass Actions and select Update on save from Actions, click Submit
11.Check the indexers Status, run php bin/magento indexer:status

Before: ✖️ 

Screenshot 2024-03-27 at 5 20 46 PM Screenshot 2024-03-27 at 5 20 54 PM Screenshot 2024-03-27 at 5 21 18 PM Screenshot 2024-03-27 at 5 21 28 PM Screenshot 2024-03-27 at 5 22 09 PM Screenshot 2024-03-27 at 5 23 05 PM Screenshot 2024-03-27 at 5 23 14 PM Screenshot 2024-03-27 at 5 24 37 PM Screenshot 2024-03-27 at 5 25 19 PM Screenshot 2024-03-27 at 5 25 28 PM Screenshot 2024-03-27 at 5 25 44 PM

After: ✔️  

Screenshot 2024-03-27 at 6 38 28 PM Screenshot 2024-03-27 at 6 38 44 PM Screenshot 2024-03-27 at 6 38 53 PM Screenshot 2024-03-27 at 6 39 12 PM Screenshot 2024-03-27 at 6 40 01 PM Screenshot 2024-03-27 at 6 40 11 PM Screenshot 2024-03-27 at 6 41 38 PM Screenshot 2024-03-27 at 6 41 49 PM Screenshot 2024-03-27 at 6 42 12 PM

Builds are failed. Hence, moving this PR to Extended Testing.

@engcom-Echo engcom-Echo moved this from Testing in Progress to Extended testing (optional) in Community Dashboard Mar 28, 2024
@engcom-Echo
Copy link
Contributor

@magento run all tests

@engcom-Echo
Copy link
Contributor

@magento run WebAPI Tests,Integration Tests,Functional Tests EE ,Functional Tests CE,Functional Tests B2B

@engcom-Echo
Copy link
Contributor

engcom-Echo commented Mar 28, 2024

Functional Tests CE,Functional Tests EE,Functional Tests B2B failure are different on last two run on same commit.

Functional Tests CE
Run1
ce-25859

Run2
Screenshot 2024-03-28 at 1 00 16 PM

Functional Tests EE
Run1
ee-25859

Run2
Screenshot 2024-03-28 at 1 00 25 PM

Functional Test B2B contains known failure.
Below are the JIRA for it.
ACQE-6364
ACQE-6363
ACQE-6346
ACQE-6366
Screenshot 2024-04-03 at 1 49 32 PM

Hence moving it to merge in progress.

@engcom-Echo engcom-Echo moved this from Extended testing (optional) to Merge in Progress in Community Dashboard Apr 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Auto-Tests: Covered All changes in Pull Request is covered by auto-tests Component: Indexer Component: Mview Partner: Fisheye partners-contribution Pull Request is created by Magento Partner Priority: P3 May be fixed according to the position in the backlog. Progress: accept Project: Community Picked PRs upvoted by the community QA: Added to Regression Scope Scenario was analysed and added to Regression Testing Scope Release Line: 2.4 Risk: high Severity: S3 Affects non-critical data or functionality and does not force users to employ a workaround.
Projects
Community Dashboard
Merge in Progress
Development

Successfully merging this pull request may close these issues.

[Issue] Drop indexer changelog tables on mview unsubscribe [Investigation] Indexers stuck after redeploy