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

Issue with update of Aoe_Scheduler. #100

Open
leiluspocus opened this issue Mar 13, 2015 · 3 comments
Open

Issue with update of Aoe_Scheduler. #100

leiluspocus opened this issue Mar 13, 2015 · 3 comments

Comments

@leiluspocus
Copy link

We recently upgraded to a new version of Magento Enterprise (EE 1.12 to EE 1.13.1). We updated the module AOE_Scheduler, switching from version 0.3.2 (that was working fine on 1.13.1) to 0.4.4.

We are experiencing the following issue since we updated the module.

Cron error while executing enterprise_refresh_index:

exception 'PDOException' with message 'SQLSTATE[42S02]: Base table or view not found: 1146 Table '<my_website>.catalog_category_product_index_tmp' doesn't exist' in /my_website/lib/Zend/Db/Statement/Pdo.php:228
Stack trace:
#0 /my_website/lib/Zend/Db/Statement/Pdo.php(228): PDOStatement->execute(Array)
#1 /my_website/lib/Varien/Db/Statement/Pdo/Mysql.php(110): Zend_Db_Statement_Pdo->_execute(Array)
#2 /my_website/app/code/core/Zend/Db/Statement.php(291): Varien_Db_Statement_Pdo_Mysql->_execute(Array)
#3 /my_website/lib/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
#4 /my_website/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('INSERT IGNORE I...', Array)
#5 /my_website/lib/Varien/Db/Adapter/Pdo/Mysql.php(428): Zend_Db_Adapter_Pdo_Abstract->query('INSERT IGNORE I...', Array)
#6 /my_website/app/code/core/Enterprise/Catalog/Model/Index/Action/Catalog/Category/Product/Refresh.php(747): Varien_Db_Adapter_Pdo_Mysql->query('INSERT IGNORE I...')
#7 /my_website/app/code/core/Enterprise/Catalog/Model/Index/Action/Catalog/Category/Product/Refresh.php(396): Enterprise_Catalog_Model_Index_Action_Catalog_Category_Product_Refresh->_reindexAnchorCategories(Object(Mage_Core_Model_Store))
#8 /my_website/app/code/core/Enterprise/Catalog/Model/Index/Action/Catalog/Category/Product/Refresh.php(170): Enterprise_Catalog_Model_Index_Action_Catalog_Category_Product_Refresh->_reindex()
#9 /my_website/app/code/core/Enterprise/Mview/Model/Client.php(109): Enterprise_Catalog_Model_Index_Action_Catalog_Category_Product_Refresh->execute()
#10 /my_website/app/code/core/Enterprise/Index/Model/Observer.php(117): Enterprise_Mview_Model_Client->execute('enterprise_cata...')
#11 [internal function]: Enterprise_Index_Model_Observer->refreshIndex(Object(Aoe_Scheduler_Model_Schedule))
#12 /my_website/app/code/community/Aoe/Scheduler/Model/Schedule.php(122): call_user_func_array(Array, Array)
#13 /my_website/app/code/local/<my_website>/Cron/Model/Observer.php(43): Aoe_Scheduler_Model_Schedule->runNow(false)
#14 /my_website/app/code/core/Mage/Cron/Model/Observer.php(262): <my_website>_Cron_Model_Observer->_processJob(Object(Aoe_Scheduler_Model_Schedule), Object(Mage_Core_Model_Config_Element), true)
#15 /my_website/app/code/core/Mage/Cron/Model/Observer.php(89): Mage_Cron_Model_Observer->_processAlwaysTask('enterprise_refr...', Object(Mage_Core_Model_Config_Element))
#16 /my_website/app/code/community/Aoe/Scheduler/Model/Observer.php(69): Mage_Cron_Model_Observer->dispatchAlways(Object(Varien_Event_Observer))
#17 /my_website/app/code/local/Mage/Core/Model/App.php(1354): Aoe_Scheduler_Model_Observer->dispatchAlways(Object(Varien_Event_Observer))
#18 /my_website/app/code/local/Mage/Core/Model/App.php(1333): Mage_Core_Model_App->_callObserverMethod(Object(<my_website>_Cron_Model_Observer), 'dispatchAlways', Object(Varien_Event_Observer))
#19 /my_website/app/Mage.php(448): Mage_Core_Model_App->dispatchEvent('always', Array)
#20 /my_website/cron.php(76): Mage::dispatchEvent('always')
#21 {main}

We disabled our override [see step 13 in the stack], thinking it was the origin of the issue, but the error is still raised. We noticed that the table 'catalog_category_product_index_tmp' doesn't exist in 1.13 (but existed in 1.12).

Any idea where this could come from ?

Thank you for your help !

@fbrnc
Copy link
Member

fbrnc commented Mar 15, 2015

Hi @leiluspocus,

here are some thoughts:

  • catalog_category_product_index_tmp is a temporary table that's generated dynamically. I don't know why it's not available at this point and/or why the enterprise_refresh_index job does expect it to be there
  • In Magento 1.13 many indexer related things have changed and some of these changes cause major problems (mostly with 1.13.0.X). So it doesn't surprise me that you're facing an indexer related issue while upgrading.
  • If you're planning to upgrade to 1.14 anyways (why wouldn't you?) and the 1.13 upgrade only was an intermediate step I suggest ignoring this issue and check if the same issue happens with 1.14
  • A new version of Aoe_Scheduler is out (currently a release candidate, but I'll create the final release tomorrow 3/15). You should use this one. it should work with Magento EE 1.13 and EE 1.14 (of course that doesn't tell you anything about your specific issue related to the enterprise_refresh_index job)
  • If you had a very early version of Aoe_Scheduler you might still have files in the local codepool, while later this changes to the community codepool. Unless your already using modman (highly recommended), you should go back and find all files related to Aoe_Scheduler and remove everything and install a fresh version. A leftover file in the local codepool will block the actual file in the community codepool from having any effect. (Read this for some general information: http://fbrnc.net/blog/2014/11/how-to-install-a-magento-module)
  • You mentioned you disabled "our override". What exactly was that doing?

I hope this helps.

Have a great day,
Fabrizio

@leiluspocus
Copy link
Author

Thank you so much for your answer @fbrnc !

It's a legacy override that I found in the app we are migrating ( See line 44: https://gist.github.com/leiluspocus/4f9f3b2dd393b9b2b462 - made in the 0.3.2 version ).

The commit message the developer left isn't clear at all, so I honestly have no idea why he did this. I guess he wanted jobs to be launched even if it was too late according to the schedule ? Was it a known bug that has been fixed in the new version ?

@janagiram
Copy link

janagiram commented Oct 7, 2016

I am using Magento EE 1.14.2.0 and AOE Scheduler 1.5.0 , but the same issue I have faced still now. Later, I have downgraded the AOE Scheduler 1.3.1. But still this issue continues in the lower version also.

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

No branches or pull requests

3 participants