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

Indexing product (on save) should be done after committing the transaction #186

Closed
tmotyl opened this issue Jan 10, 2013 · 2 comments
Closed

Comments

@tmotyl
Copy link
Contributor

tmotyl commented Jan 10, 2013

Right now while saving product, Magento indexes it in _afterSave() method.

https://github.com/magento/magento2/blob/master/app/code/core/Mage/Catalog/Model/Product.php line 516
Mage::getSingleton('Mage_Index_Model_Indexer')->processEntityAction( $this, self::ENTITY, Mage_Index_Model_Event::TYPE_SAVE );
The problem is that this method is called before committing save transaction.
see https://github.com/magento/magento2/blob/master/app/code/core/Mage/Core/Model/Abstract.php line 361

Current solution can lead some problems problems

  • indexer might use old product data
  • if indexer fails, e.g. throws exception, product will not be saved
  • transaction stays open for the time of indexing
    -....

Instead, indexing product should be done in the event like 'catalog_product_model_save_commit_after'

@magento-team
Copy link
Contributor

Hello. Thank you for reporting this issue. We are working on major changes in indexing functionality and we will take care of this one but this will take time.

@syedkazimi
Copy link

Hi @mage2-team,
When I import CSV products into Magento, with all the attributes, the layered navigation does not know about these products or their attributes (even after re-indexing many times).
Product or its attribute(s), e.g. Brand Name, only starts appearing under Brand Name filter after I MANUALLY EDIT PRODUCT, UPDATE ITS BRAND NAME ATTRIBUTE AND SAVE THE PRODUCT AGAIN (VIA ADMIN PANEL).
I have very large catalog of 300k products. So opening each product, updating its Brand Name attribute, and saving it again is not an option.
I have googled a lot, but did not find any specific answer for this problem.
Please Help me solving this issue.

magento-team pushed a commit that referenced this issue Mar 23, 2015
[GitHub] Accept github pull requests 1088, 1052, 987
maksek pushed a commit that referenced this issue Nov 17, 2015
[GoInc+Dragons] BugFixing again
mmansoor-magento pushed a commit that referenced this issue Aug 1, 2016
mmansoor-magento pushed a commit that referenced this issue Sep 13, 2016
[South] Bugfixes

- MAGETWO-52925 Simple child product without a special price still shown as "was (original price)" #4442 #5097
- MAGETWO-55327 [FT] Filter not applied on current page in test.
- MAGETWO-56584 [FT] Custom options are not created for product in test
- MAGETWO-57535 L2 Plan fails on mainline develop branch- Build B2B-DEV-TPFX3,3 #186
- MAGETWO-56341 Maximum error count when importing because issue URL key for specified store already exists
- MAGETWO-56077 [GitHub] Unable to add more than 1 product to a cart from Wishlist #5282
- MAGETWO-55975 [FT] Cannot set date of birth in customer form
- MAGETWO-56753 [FT] Cannot click on action-select button in customers grid block
- MAGETWO-55782 [FT] Threre is no "schedule update" section in "New Category" form
- MAGETWO-57205 Attribute for Send Welcome Email From shows wrong store ID
magento-engcom-team added a commit that referenced this issue Nov 12, 2018
 - Merge Pull Request magento/graphql-ce#186 from magento/graphql-ce:graphQl-44-product-textarea-field-format
 - Merged commits:
   1. 8aedb95
   2. cde04fc
   3. c95cac9
   4. 79a968b
   5. a098fe5
   6. 476f14f
   7. 80669e3
   8. a18a087
   9. 0a4dc35
   10. 2fcc183
   11. be525d1
   12. f82912d
   13. cac1016
   14. 43804b9
   15. 25fd467
   16. 607729e
   17. 6a20b98
   18. 45d3742
magento-cicd2 pushed a commit that referenced this issue Jan 28, 2020
magento-devops-reposync-svc pushed a commit that referenced this issue Dec 20, 2023
LYNX-310 & LYNX-302: GraphQl: Added `status` attribute in cart query and add product to cart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants