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

fix for #38315 issue (Missing indexing of required columns in catalog_product_entity_int table) #38316

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

Conversation

rostilos
Copy link
Contributor

@rostilos rostilos commented Dec 25, 2023

Description (*)

Added indexing of entity_id column to avoid cases of "hang" of select query in mysql ( full description of the problem is in linked issue )

For example, after edits, the SELECT query specified in the issue are successful and in a fraction of a second
2023-12-25_21-44
2023-12-25_21-44_1

Related Pull Requests

https://github.com/magento-gl/magento2ee/pull/271

Fixed Issues (if relevant)

  1. Fixes Missing indexing of required columns in catalog_product_entity_int table #38315

Manual testing scenarios (*)

1.A relatively large catalog is needed.
In a test environment, it is reproduced on a test catalog generated with the
bin/magento setup:perf:generate-fixtures setup/performance-toolkit/profiles/ce/extra_large.xml
2. Start the reindex process
bin/magento indexer:reset
bin/magento indexer:reindex catalogsearch_fulltext
3. Successful reindex

Questions or comments

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)
  • README.md files for modified modules are updated and included in the pull request if any README.md predefined sections require an update
  • All automated tests passed successfully (all builds are green)

Copy link

m2-assistant bot commented Dec 25, 2023

Hi @rostilos. Thank you for your contribution!
Here are some useful tips on 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.4-develop instance - deploy vanilla Magento instance

❗ Automated tests can be triggered manually with an appropriate comment:

  • @magento run all tests - run or re-run all required tests against the PR changes
  • @magento run <test-build(s)> - run or re-run specific test build(s)
    For example: @magento run Unit Tests

<test-build(s)> is a comma-separated list of build names.

Allowed build names are:
  1. Database Compare
  2. Functional Tests CE
  3. Functional Tests EE
  4. Functional Tests B2B
  5. Integration Tests
  6. Magento Health Index
  7. Sample Data Tests CE
  8. Sample Data Tests EE
  9. Sample Data Tests B2B
  10. Static Tests
  11. Unit Tests
  12. WebAPI Tests
  13. Semantic Version Checker

You can find more information about the builds here
ℹ️ Run only required test builds during development. Run all test builds before sending your pull request for review.


For more details, review the Code Contributions documentation.
Join Magento Community Engineering Slack and ask your questions in #github channel.

@rostilos
Copy link
Contributor Author

@magento run all tests

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.

@engcom-Hotel engcom-Hotel added the Priority: P2 A defect with this priority could have functionality issues which are not to expectations. label Dec 26, 2023
@rostilos
Copy link
Contributor Author

@magento run all tests

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.

@ihor-sviziev
Copy link
Contributor

ihor-sviziev commented Dec 27, 2023

According to failed tests, it works fine for Magento Open Source but won't work for Magento Commerce / B2B (conflicts with the Content Staging feature).
Do you think you'll be able to make it compatible?

@rostilos
Copy link
Contributor Author

rostilos commented Dec 27, 2023

Yeah, I'll try to fix that
But to be honest, don't have much experience with B2B and EE versions

@rostilos
Copy link
Contributor Author

@magento run Database Compare

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.

@rostilos
Copy link
Contributor Author

rostilos commented Dec 29, 2023

@ihor-sviziev
Proposal for a fix.
I can't make compatibility with B2B and EE modules through edits in this repository. But, if edits are made, maybe you could make edits for DB schema in magento-catalog-staging module ?
2023-12-29_10-35

<index referenceId="CATALOG_PRODUCT_ENTITY_INT_ATTRIBUTE_ID_ENTITY_ID" disabled="1"/>
<index referenceId="CATALOG_PRODUCT_ENTITY_INT_ATTRIBUTE_ID_ROW_ID" indexType="btree">
     <column name="attribute_id"/>
     <column name="row_id"/>
</index>

@ihor-sviziev
Copy link
Contributor

@engcom-Hotel maybe you can help with fixing b2b/ee part?

@sinhaparul sinhaparul added the Project: Community Picked PRs upvoted by the community label Jan 25, 2024
@engcom-Hotel
Copy link
Contributor

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

@engcom-Delta engcom-Delta added the Triage: Dev.Experience Issue related to Developer Experience and needs help with Triage to Confirm or Reject it label Feb 13, 2024
@engcom-Echo engcom-Echo removed their assignment Feb 14, 2024
@engcom-Hotel
Copy link
Contributor

@magento run all tests

@engcom-Hotel
Copy link
Contributor

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

@engcom-Hotel
Copy link
Contributor

✔️ QA Passed

Added the missing indexing of required columns in catalog_product_entity_int table

As mentioned in the related issue i.e. #38315 (comment), the reproduction of this issue is not possible.

but we can move ahead by looking into the changes of the PR, the PR is creating an index on the attribute_id and entity_id columns for the catalog_product_entity_int table.

Hence moving forward with this PR for approval on Database compare and Semantic Version Checker failures

Thanks

@engcom-Hotel
Copy link
Contributor

engcom-Hotel commented Feb 15, 2024

Created internal JIRA tickets https://jira.corp.adobe.com/browse/AC-11055 and https://jira.corp.adobe.com/browse/AC-11056 for database compare and SVC failure approvals.

Copy link

@andrewbess andrewbess left a comment

Choose a reason for hiding this comment

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

Hello @rostilos
Thank you for your contribution
It looks good for me.
Great job.
Looks like we need to wait passing of the approval ticket.

@engcom-Hotel
Copy link
Contributor

Bot moved this PR from Pending Approval to Ready for testing. Moving back to Pending Approval.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Performance help wanted Partner: Perspective Team partners-contribution Pull Request is created by Magento Partner Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Progress: pending approval Project: Community Picked PRs upvoted by the community Triage: Dev.Experience Issue related to Developer Experience and needs help with Triage to Confirm or Reject it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missing indexing of required columns in catalog_product_entity_int table
9 participants