Page MenuHomePhabricator

Table 'phabricator_metamta.metamta_mailinglist' doesn't exist in phabricator/bin/upgrade storage
Closed, ResolvedPublic

Description

Reproduction steps:
After following up upgrade steps located here: https://secure.phabricator.com/book/phabricator/article/upgrading/
and running phabricator/bin/storage upgrade, I receive the following error:

Storage is up to date. Use 'storage status' for details.
Verifying database schemata...
[2016-07-18 09:49:59] EXCEPTION: (AphrontSchemaQueryException) #1146: Table 'phabricator_metamta.metamta_mailinglist' doesn't exist at [<phutil>/src/aphront/storage/connection/mysql/AphrontBaseMySQLDatabaseConnection.php:325]
arcanist(head=master, ref.master=8f69a5c378c3), phabricator(head=master, ref.master=959337ec62f5), phutil(head=master, ref.master=ff84abc7d857)
  #0 AphrontBaseMySQLDatabaseConnection::throwCommonException(integer, string) called at [<phutil>/src/aphront/storage/connection/mysql/AphrontBaseMySQLDatabaseConnection.php:348]
  #1 AphrontBaseMySQLDatabaseConnection::throwQueryCodeException(integer, string) called at [<phutil>/src/aphront/storage/connection/mysql/AphrontBaseMySQLDatabaseConnection.php:289]
  #2 AphrontBaseMySQLDatabaseConnection::throwQueryException(unknown type) called at [<phutil>/src/aphront/storage/connection/mysql/AphrontBaseMySQLDatabaseConnection.php:185]
  #3 AphrontBaseMySQLDatabaseConnection::executeRawQuery(string) called at [<phutil>/src/xsprintf/queryfx.php:6]
  #4 queryfx(AphrontMySQLDatabaseConnection, string, string, string)
  #5 call_user_func_array(string, array) called at [<phutil>/src/xsprintf/queryfx.php:11]
  #6 queryfx_all(AphrontMySQLDatabaseConnection, string, string, string) called at [<phabricator>/src/applications/config/schema/PhabricatorConfigSchemaQuery.php:139]
  #7 PhabricatorConfigSchemaQuery::loadActualSchema() called at [<phabricator>/src/infrastructure/storage/management/workflow/PhabricatorStorageManagementWorkflow.php:78]
  #8 PhabricatorStorageManagementWorkflow::loadSchemata() called at [<phabricator>/src/infrastructure/storage/management/workflow/PhabricatorStorageManagementWorkflow.php:413]
  #9 PhabricatorStorageManagementWorkflow::findAdjustments() called at [<phabricator>/src/infrastructure/storage/management/workflow/PhabricatorStorageManagementWorkflow.php:107]
  #10 PhabricatorStorageManagementWorkflow::doAdjustSchemata(boolean) called at [<phabricator>/src/infrastructure/storage/management/workflow/PhabricatorStorageManagementWorkflow.php:89]
  #11 PhabricatorStorageManagementWorkflow::adjustSchemata(boolean) called at [<phabricator>/src/infrastructure/storage/management/workflow/PhabricatorStorageManagementUpgradeWorkflow.php:84]
  #12 PhabricatorStorageManagementUpgradeWorkflow::didExecute(PhutilArgumentParser) called at [<phabricator>/src/infrastructure/storage/management/workflow/PhabricatorStorageManagementWorkflow.php:69]
  #13 PhabricatorStorageManagementWorkflow::execute(PhutilArgumentParser) called at [<phutil>/src/parser/argument/PhutilArgumentParser.php:410]
  #14 PhutilArgumentParser::parseWorkflowsFull(array) called at [<phutil>/src/parser/argument/PhutilArgumentParser.php:303]
  #15 PhutilArgumentParser::parseWorkflows(array) called at [<phabricator>/scripts/sql/manage_storage.php:211]
phab /usr/local/phabricator/phabricator/bin >

Expected result:
I normally run the storage upgrade command without issue. The error began following a git pull a couple of months ago. I didn't report the issue at the time, and I no longer know which revision caused the problem. I now receive the error with each upgrade.

Version Information

phabricator 959337ec62f5f72dacd6541715106c2a54d19449 (Fri, Jul 15) 
arcanist 8f69a5c378c317f0a85b33151ee769626c0ecf00 (Tue, Jul 12) 
phutil ff84abc7d8575799b9a5323bb5b549925c6f6185 (Tue, Jul 12)

Event Timeline

This appears to be a problem unique to your environment, because we and many other users follow the upgrade steps routinely without encountering this or similar errors. In particular, I can't reproduce it given the information provided.

As described in Contributing Bug Reports and Providing Reproduction Steps, we can't move forward with bug reports without reproducing the issue first. We either need:

  • access to an environment where the issue reproduces; or
  • steps we can follow in a clean environment to reproduce the issue.

Though I don't completely understand the specifics, I do have this issue resolved.

#1146: Table 'phabricator_metamta.metamta_mailinglist' doesn't exist

is an error from MySQL, and not from Phabricator. I believe the problem started when I restored the database from a backup. Rather that using a dump/restore, I rolled back to a previous filesystem snapshot on my database server. That filesystem snapshot contained :

mysql/phabricator_metamta/metamta_mailinglist.frm	
mysql/phabricator_metamta/metamta_mailinglist.ibd

database files. That particular table, however, no longer exists in the current versions of Phabricator. Once I removed those two files from the database server and restarted the MySQL server, the bin/storage upgrade command worked without error.

Thanks for your time and the work you all do on Phabricator.

epriestley claimed this task.