Download the PHP package aligent/magento2-indexer-fix without Composer

On this page you can find all versions of the php package aligent/magento2-indexer-fix. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package magento2-indexer-fix

Magento 2 Scheduled Indexing Fix

This module is designed to fix a common issue around the scheduled "mview" indexing within Magento 2.

Background

When indexers are set to update by schedule, the scenario is as follows:

Additionally, some indexers use the data created by another indexer. For example, the catalogsearch_fulltext indexer may use indexed category and price data.

Indexed data is updated via the indexer_update_all_views cron job. This job loops through all scheduled indexers and updates its data based on the latest changelog record for each one.

Issue

When indexer_update_all_views runs, it will get the changelog information for a single indexer, process it, and then move on to the next one. Consider the following scenario:

  1. The mview_state table has version_id of 100 for both catalog_product_price and catalogsearch_fulltext records.
  2. Both catalog_product_price_cl and catalogsearch_fulltext_cl changelog tables are also at version 100.
  3. The prices of 10 products are updated
    1. This adds 10 records to catalog_product_price_cl and catalogsearch_fulltext_cl
    2. Latest version in the changelog tables is now 110
  4. indexer_update_all_views begins, and starts to process the catalog_product_price indexer.
    1. It determines that it needs to process changelog records 101-110
  5. Before the price indexer has finished processing, 10 more product prices are updated.
    1. 10 more recrds are added to catalog_product_price_cl and catalogsearch_fulltext_cl
    2. Latest version in the changelog tables is now 120
  6. indexer_update_all_views finishes processing the price indexer, and moves on to catalogsearch_fulltext
    1. It determines that it needs to process changelog records 101-120
  7. indexer_update_all_views completes
  8. The next run of indexer_update_all_views processes records 111-120 for the price indexer.

After this, everything seems to be up to date - this is not the case. Since the catalogsearch_fulltext indexer uses indexed price data, when it processed records 101-120, it did not have up-to-date data for 111-120, as these had not yet been processed by the price indexer.

The products corresponding to these last 10 changelog records will not be updated by the catalogsearch_fulltext indexer again until either:

Fix

In order to avoid timing issues relating to updates happening at the same time as index processing, this module does the following:

By doing this, any new changelog records that are created while the job is running will be ignored, and instead processed by the next run.

Installation

To install this module, the following commands can be run:


All versions of magento2-indexer-fix with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
magento/framework Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package aligent/magento2-indexer-fix contains the following files

Loading the files please wait ....