hhuijser/liferay-portal — pull request #2186 by yuhai (2014-10-24 02:55:03+00:00)
Title: LPS-51059  Deleting categories fills up transaction log due to repeated sql statements

The PR extends the https://github.com/hhuijser/liferay-portal/pull/2184.

The issue might be caused by rebuildTree many times when delete lots of Category (for example, 5000 categorys all include subCategorys). Because when delete one category which has subCategorys, we will execute rebuildTree once.

Refer to Julio's solution: After deleting all the categories, we will execute rebuildTree once.
https://in.liferay.com/web/global.engineering/forums/-/message_boards/message/3664418#_19_message_3664945

The fix removes the original logic "before, we only rebuildTree when we delete one category which have subCategory". At the current, the fix will rebuild tree once after deleting all categories (one or many or vocabulary with all categories).

In addition, in order to keep previous API won't be broken in AssetCategoryLocalServiceImpl class, we keep the original the param "boolean childCategory".

Please help check it.

Thanks,
Hai