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

Fixes for full indexation (class not found + generator instead of array) #70

Closed
wants to merge 2 commits into from

Conversation

Echron
Copy link
Member

@Echron Echron commented May 29, 2024

Description (*)

Bugfixes:

  • Rename Magento\Framework\Mview\View\ChangeLogBatchWalker to Magento\Framework\Mview\View\ChangelogBatchWalker (lowercase L in log). This was throwing a "class does not exist" error during reindexation on case sensitive systems
  • Make sure we loop over the batches of ids we get back from the batch walker. The batch walker returns a generator, we should walk over that generator and get the batches with ids

Bug

#69

Manual testing scenarios (*)

Test this by running the full indexation in CLI

@zlik
Copy link
Contributor

zlik commented Aug 21, 2024

@Echron, thank you for your PR! Your suggested changes have been implemented here: https://github.com/magento-commerce/facebook-for-magento2/pull/746 and released in v1.3.2.

@zlik zlik closed this Aug 21, 2024
@AaronONeill
Copy link

@zlik @Echron

This seems to break backwards compatibility?

For example on Magento 2.4.7-p2 the class exists as Magento\Framework\Mview\View\ChangelogBatchWalker but on a 2.4.5-p9 for example it exists still as Magento\Framework\Mview\View\ChangeLogBatchWalker

@sdouma
Copy link

sdouma commented Sep 24, 2024

cataloginventory_stock batches are an array of ids so this is passing a string for me and throws and error

        while ($currentVersionId < $nextVersionId) {
            $walker = $this->getChangelogBatchWalkerInstance();
            $batches = $walker->walk($cl, $currentVersionId, $nextVersionId, $batchSize);

            foreach ($batches as $ids) {
                if (empty($ids)) {
                    break;
                }
                $currentVersionId += $batchSize;
                $this->fbCatalogUpdateResourceModel->addProductsWithChildren($ids, 'update');
            }
        }
    }

@patruvlad
Copy link

Sa

cataloginventory_stock batches are an array of ids so this is passing a string for me and throws and error

        while ($currentVersionId < $nextVersionId) {
            $walker = $this->getChangelogBatchWalkerInstance();
            $batches = $walker->walk($cl, $currentVersionId, $nextVersionId, $batchSize);

            foreach ($batches as $ids) {
                if (empty($ids)) {
                    break;
                }
                $currentVersionId += $batchSize;
                $this->fbCatalogUpdateResourceModel->addProductsWithChildren($ids, 'update');
            }
        }
    }

I have the same issue, reindexing is failing now because of this

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

Successfully merging this pull request may close these issues.

5 participants