? ? Pending

User tests: Successful: Unsuccessful:

avatar Hackwar
Hackwar
13 May 2021

Pull Request for Issue #32904.

Summary of Changes

On a large site with Smart Search enabled, changing the state of a category will fail with a timeout, since it will try to reindex all items in the category. While the indexer will abort when noticing that the content is still the same, the plugin will load all those content items (for example articles) and prepare them for indexing. This takes a very long time and in nearly all cases is unnecessary. Thus we remove the reindexing step. If a data source indeed requires the reindexing, it can still add that step back into its plugin when overriding the methods of the Smart Search adapter.

Testing Instructions

  1. Get a huge site, for example from the initial issue report and setup a site with that.
  2. Try to publish or unpublish a category with a lot of content in it. The SQL from @PhilETaylor has categories with 1000 articles in them

Actual result BEFORE applying this Pull Request

The site loads forever and eventually dies.

Expected result AFTER applying this Pull Request

The category is published and the index is properly updated in a reasonable time.

avatar Hackwar Hackwar - open - 13 May 2021
avatar Hackwar Hackwar - change - 13 May 2021
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 13 May 2021
Category Administration com_finder
avatar Hackwar Hackwar - change - 10 Aug 2021
Title
[4.0] Smart Search: Don't reindex when changing access or publish state
[4.1] Smart Search: Don't reindex when changing access or publish state
avatar Hackwar Hackwar - edited - 10 Aug 2021
avatar JenSeReal JenSeReal - test_item - 27 Aug 2021 - Tested successfully
avatar JenSeReal
JenSeReal - comment - 27 Aug 2021

I have tested this item successfully on fee0044

Tested this with 15,915 articles and 368 categories created with Overload with php ~/overload/overload.php --site-url="http://localhost" --categories-levels=5 --categories-count=3 --articles-count=50.
On the latest 4.0-dev commit I got timeouts (I think when the session times out and you need to relogin) when publishing or unpublishing all categories and doing the same with a category that has many subcategories the same issue occured.
I also tested this pull request and nothing changed.

With this pull request unpublishing all categories took 52s, and republishing all categories took 1m42s and I could not find any breaking changes.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/33853.

avatar pabloarias pabloarias - test_item - 17 Sep 2021 - Not tested
avatar pabloarias
pabloarias - comment - 17 Sep 2021

I have not tested this item.

Tested with Overload tool too. 1000 articles per category.

Before applying this patch, I obtain a server error: 502 Bad Gateway.

After applying this patch, it has taken just some seconds.

Thank you!


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/33853.

avatar pabloarias pabloarias - test_item - 17 Sep 2021 - Tested successfully
avatar pabloarias
pabloarias - comment - 17 Sep 2021

I have tested this item successfully on fee0044


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/33853.

avatar chmst chmst - change - 19 Oct 2021
Status Pending Ready to Commit
avatar chmst
chmst - comment - 19 Oct 2021

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/33853.

avatar bembelimen bembelimen - change - 19 Oct 2021
Labels Added: ?
avatar bembelimen bembelimen - change - 19 Oct 2021
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2021-10-19 10:46:10
Closed_By bembelimen
Labels Added: ?
avatar bembelimen bembelimen - close - 19 Oct 2021
avatar bembelimen bembelimen - merge - 19 Oct 2021
avatar bembelimen
bembelimen - comment - 19 Oct 2021

Thx

Add a Comment

Login with GitHub to post a comment