sdinteractive / SomethingDigital_EnterpriseIndexPerf

Magento EE index performance optimization
MIT License
8 stars 3 forks source link

Magento EE 1.14.3.7 compatibility #22

Open not-art opened 6 years ago

not-art commented 6 years ago

Hi Something Digital team!

The engineers here at Zebit had been using this extension up until we applied the most-recent Magento 1 EE patch we had tested (1.14.3.7).

SomethingDigital_EnterpriseIndexPerf is not listed as compatible with our current Magento EE version (as mentioned, 1.14.3.7), and we proved that it's not compatible after testing it's use post-upgrade... it does not play well with the Visual Merchandiser for Categories:

Issue with SomethingDigital_EnterpriseIndexPerf on Magento 1.14.3.7 patch:

Expected Result:

More Info To Come!

Please let us know if you'd like any additional details regarding our setup. Cheers!

-Art @ Zebit Engineering

not-art commented 6 years ago

Some extra context from said-mentioned engineer:

There's an issue where the SomethingDigital_EnterpriseIndexPerf indexer is incorrectly setting the sort order for a category when changes to an unrelated category are made. For example, change the sort order for category 1 via VM, things look good. Then go in and make any update to some other unrelated category and the sort order of products in cat 1 will be overwritten.

The sort order will initially be 1, then something like 10000 after the SomethingDigital_EnterpriseIndexPerf indexer runs.

toddbc commented 6 years ago

Interesting. The main change we make to the sorting process is to avoid resetting it if not necessary. We haven't dug into this much since we've focused on Magento 2 - although we do have Magento 1 clients using this who aren't seeing this so far.

But here are some notes that may help.

Basically, this: https://github.com/sdinteractive/SomethingDigital_EnterpriseIndexPerf/blob/f68b4839fce567ae1fd255fd26071e683755ce5d/app/code/community/SomethingDigital/EnterpriseIndexPerf/Model/Merchandiser/Sorting.php#L20-L21

We also avoid resorting multiple times, which by default causes lots of reindexing: https://github.com/sdinteractive/SomethingDigital_EnterpriseIndexPerf/blob/941f998ccce38004da7e7b3efacebcf1c493734c/app/code/community/SomethingDigital/EnterpriseIndexPerf/Model/Merchandiser/Indexer.php#L77

You can see that this prevents the complete category rebuild on cron here: https://github.com/sdinteractive/SomethingDigital_EnterpriseIndexPerf/blob/941f998ccce38004da7e7b3efacebcf1c493734c/app/code/community/SomethingDigital/EnterpriseIndexPerf/Model/Observer/Merchandiser.php#L18-L20

I'm not aware of any - but if this is behaving differently from OOB, it either means that one of the 1.1.4.3.x patches has changed this module's behavior (should be visible in the patches), or else we missed something for a specific combination of settings.

You'll note that existing products are retained in their existing sort order: https://github.com/sdinteractive/SomethingDigital_EnterpriseIndexPerf/blob/941f998ccce38004da7e7b3efacebcf1c493734c/app/code/community/SomethingDigital/EnterpriseIndexPerf/Model/Merchandiser/Indexer.php#L53-L69

Which is obtained here: https://github.com/sdinteractive/SomethingDigital_EnterpriseIndexPerf/blob/941f998ccce38004da7e7b3efacebcf1c493734c/app/code/community/SomethingDigital/EnterpriseIndexPerf/Model/Merchandiser/Indexer.php#L25-L30

But perhaps there's now an issue with retaining that order.

My guess is the behavior is kicking off here: https://github.com/sdinteractive/SomethingDigital_EnterpriseIndexPerf/blob/941f998ccce38004da7e7b3efacebcf1c493734c/app/code/community/SomethingDigital/EnterpriseIndexPerf/Model/Observer/Merchandiser.php#L31

Although would need to double check your flat indexer setting - we've most heavily tested this with flat indexing enabled.

not-art commented 6 years ago

Thanks todd! We'll dig in to your comments to see if it helps at all in the meantime.

We do have category and product flat index enabled, and the indexer settings for them are to update when scheduled. The enterprise_refresh_index runs every 15 minutes via cron right now.

tmotyl commented 5 years ago

hi @not-art, Have you found a solution?