Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There should be no limit on the IdListBuilder since it is chunked in:
vendor/magento/module-sales/Model/ResourceModel/Grid.php
:Description (*)
The limit in the select is removed so it will fetch all results and later it will be chuncked.
Related Pull Requests
Manual testing scenarios (*)
sales_order_grid
is also filled with this orderssales_order_grid
magerun2 sys:cron:run sales_grid_order_async_insert
vendor/magento/module-sales/Model/ResourceModel/Grid.php
The code above will be run and fetch
$notSyncedIds
and chunck it in batches. The provider used is:vendor/magento/module-sales/Model/ResourceModel/Provider/UpdatedIdListProvider.php
and does this:and builds a select with the
idListQueryBuilder
:In here there is limit:
$select->limit(Grid::BATCH_SIZE);
the same as the chunk batch size inrefreshBySchedule
. This looks like a bug to me, because you will never get more items than 100. Now this will probably only occur when thesales_order_grid
is truncated or more than 100 orders are placed between the cron execution.Questions or comments
Eventually the grid will be filled, because the cron is run every minute. But it takes a lot of time if you have a lot of orders.
Contribution checklist (*)
Resolved issues: