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

Improve Manual Mode indexing #171

Closed
colinmollenhour opened this issue Dec 18, 2012 · 7 comments
Closed

Improve Manual Mode indexing #171

colinmollenhour opened this issue Dec 18, 2012 · 7 comments
Labels
Fixed in 2.4.x The issue has been fixed in 2.4-develop branch improvement Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed

Comments

@colinmollenhour
Copy link

One of my dreams is for Magento to be able to:

  1. Perform the heavy lifting of indexes in the background in near-real-time by using a separate daemon of sorts that uses a pub/sub method (e.g. Redis) to wake up the indexer instantly.
  2. Clear the related cache tags only after the reindexing is complete. (otherwise the cache may be rewarmed before the reindexing is complete).
  3. Not have potential issues with process statuses. Currently I think it would be possible for the status to end up as "pending" even though new events were added while some events were being processed. That is, the status should not be changed to "pending" if new events were added in the meantime (e.g.: prevent update if updated_at time changed)
@magento-team
Copy link
Contributor

Hello Colin. Can you reach out to me at peter(at) magento.com? I'd like to discuss this in more details

@magento-team
Copy link
Contributor

Hi. Could you please elaborate on #2? Do you mean that we should invalidate FPC entry for given page (product X) only after product X is already indexed? Our current approach was to use cache even the previous version and then refresh cache.

@colinmollenhour
Copy link
Author

The 2nd point was not necessarily specifically related to FPC, but to cache in general (e.g. block_html). After (1) is implemented, if proper block rendering is dependent on indexes, then if indexes are rebuilt in the background but cache is cleared in the foreground (i.e. _afterSave method calls cleanCache($this->getTagIds())) then this would allow a situation where the cache is cleared and then re-populated before the background indexer completes reindexing which would mean you basically just refreshed stale cache entries. So, one solution might be to store the list of tags to be cleared in the indexer event so that the background indexer can clear the tags after the event is processed.

@tux-rampage
Copy link

This would require a Jobq implementation like ZendJobq or Gearman which is not available everywhere.

Imho this should be implemented as optional feature using a Jobq-Implementation only when it is available. The user should be able to specify a Jobq strategy in the system configuration.

I've implemented a Jobq module for Magento 1.x which supports ZendJobq, Gearman and a cli/cron based setup maybe I can port this to magento 2 core.

When implementing background jobs, you need to be aware of certain circumstances.
For example:

  • When a product is saved a second time the indexer must not start before the first index run has finished.
  • When triggering a Reindex for all products, it must not start before all individual indixers have completed and maybe it should cancel pending ones.

@colinmollenhour
Copy link
Author

The indexer tables are already pretty close to acting as a job queue, just not a general purpose one. I think a general purpose job queue in Magento would be great, no almost a necessity..

@colinmollenhour
Copy link
Author

These changes would never see CE anyway so closing..

vpelipenko added a commit that referenced this issue Mar 23, 2015
maksek pushed a commit that referenced this issue Nov 17, 2015
VitaliyBoyko pushed a commit to VitaliyBoyko/magento2 that referenced this issue Nov 25, 2017
…ck-sales-channel

Stock Removal. Throw an exception and allow to delete just unassigned stocks
magento-cicd2 pushed a commit that referenced this issue Jan 28, 2020
@magento-engcom-team
Copy link
Contributor

Hi @colinmollenhour. Thank you for your report.
The issue has been fixed in #27597 by @lbajsarowicz in 2.4-develop branch
Related commit(s):

The fix will be available with the upcoming 2.4.0 release.

@magento-engcom-team magento-engcom-team added Fixed in 2.4.x The issue has been fixed in 2.4-develop branch Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed labels May 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fixed in 2.4.x The issue has been fixed in 2.4-develop branch improvement Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed
Projects
None yet
Development

No branches or pull requests

4 participants