Page MenuHomePhabricator

20131121.repocredentials.2.mig.php fails with too many repos - Data too long for column 'name' in passphrase_credential
Closed, ResolvedPublic

Description

I tried to upgrade the db and had the following fail. Looks like I have too many repos and it makes the name column in passphrase_credential blow out.

Full dump below:

Applying patch 'phabricator:20131121.repocredentials.2.mig.php'...
Examining repository UQSW...
...will migrate.
Examining repository UQSM...
...will migrate.
Examining repository AP...
...will migrate.
Examining repository AC...
...will migrate.
Examining repository DEL...
...will migrate.
Examining repository ECPS...
...will migrate.
Examining repository COM...
...will migrate.
Examining repository UQSA...
...will migrate.
Examining repository CP...
...will migrate.
Examining repository ODP...
...will migrate.
Examining repository MAPS...
...will migrate.
Examining repository OLD...
...will migrate.
Examining repository RESFE...
...will migrate.
Examining repository STUDY...
...will migrate.
Examining repository LO...
...will migrate.
Examining repository PPL...
...will migrate.
Examining repository ITSLO...
...will migrate.
Examining repository NAVA...
...will migrate.
Examining repository NAVI...
...will migrate.
Examining repository NAVC...
...will migrate.
Examining repository UQOWS...
...will migrate.
Examining repository PS...
...will migrate.
Examining repository COMM...
...will migrate.
Examining repository AT...
...will migrate.
Examining repository PUP...
...will migrate.
Examining repository OLAS...
...will migrate.
Examining repository OLVQ...
...will migrate.
Examining repository ETRS...
...will migrate.
Examining repository PH...
...will migrate.
Examining repository ODPM...
...will migrate.
Examining repository ODPW...
...will migrate.
Examining repository EEL...
...will migrate.
Examining repository QUAL...
...will migrate.
Examining repository UQSI...
...will migrate.
Examining repository EDON...
...will migrate.
Examining repository GP...
...will migrate.
Examining repository LDDASH...
...will migrate.
Examining repository TSMF...
...will migrate.
Examining repository SUQAA...
...will migrate.
Examining repository SUQPL...
...will migrate.
Examining repository LEG...
...will migrate.
Examining repository SUQI...
...will migrate.
Examining repository SUQA...
...will migrate.
Examining repository DMS...
...will migrate.
Examining repository UQDRUPAL...
...will migrate.
Creating: Migrated Repository Credential (UQSW, UQSM, AP, AC, DEL, ECPS, COM, UQSA, CP, ODP, MAPS, OLD, RESFE, LO, PPL, ITSLO, NAVA, NAVI, NAVC, UQOWS, PS, COMM, AT, PUP, OLAS, PH, ODPM, ODPW, EEL, QUAL, UQSI, EDON, GP, LDDASH, TSMF, SUQAA, SUQPL, LEG, SUQI, SUQA, DMS, UQDRUPAL)...
[2013-12-02 13:22:46] EXCEPTION: (AphrontQueryException) #1406: Data too long for column 'name' at row 1 at [/opt/apps/phabricator/test/php/libphutil/src/aphront/storage/connection/mysql/AphrontMySQLDatabaseConnectionBase.php:311]

#0 AphrontMySQLDatabaseConnectionBase::throwQueryCodeException(1406, Data too long for column 'name' at row 1) called at [/opt/apps/phabricator/test/php/libphutil/src/aphront/storage/connection/mysql/AphrontMySQLDatabaseConnectionBase.php:278]
#1 AphrontMySQLDatabaseConnectionBase::throwQueryException(Object mysqli) called at [/opt/apps/phabricator/test/php/libphutil/src/aphront/storage/connection/mysql/AphrontMySQLDatabaseConnectionBase.php:184]
#2 AphrontMySQLDatabaseConnectionBase::executeRawQuery(INSERT INTO `passphrase_credential` (`name`, `credentialType`, `providesType`, `viewPolicy`, `editPolicy`, `description`, `username`, `secretID`, `isDestroyed`, `phid`, `dateCreated`, `dateModified`) VALUES ('Migrated Repository Credential (UQSW, UQSM, AP, AC, DEL, ECPS, COM, UQSA, CP, ODP, MAPS, OLD, RESFE, LO, PPL, ITSLO, NAVA, NAVI, NAVC, UQOWS, PS, COMM, AT, PUP, OLAS, PH, ODPM, ODPW, EEL, QUAL, UQSI, EDON, GP, LDDASH, TSMF, SUQAA, SUQPL, LEG, SUQI, SUQA, DMS, UQDRUPAL)', 'ssh-key-file', 'provides/ssh-key-file', 'admin', 'admin', '', 'phabricator', '5', '0', 'PHID-CDTL-27ze6vx67yxx3h4u2vqx', '1385954566', '1385954566')) called at [/opt/apps/phabricator/test/php/libphutil/src/xsprintf/queryfx.php:9]
#3 queryfx(Object AphrontMySQLiDatabaseConnection, %Q INTO %T (%LC) VALUES (%Q), INSERT, passphrase_credential, Array of size 12 starting with: { 0 => name }, 'Migrated Repository Credential (UQSW, UQSM, AP, AC, DEL, ECPS, COM, UQSA, CP, ODP, MAPS, OLD, RESFE, LO, PPL, ITSLO, NAVA, NAVI, NAVC, UQOWS, PS, COMM, AT, PUP, OLAS, PH, ODPM, ODPW, EEL, QUAL, UQSI, EDON, GP, LDDASH, TSMF, SUQAA, SUQPL, LEG, SUQI, SUQA, DMS, UQDRUPAL)', 'ssh-key-file', 'provides/ssh-key-file', 'admin', 'admin', '', 'phabricator', '5', '0', 'PHID-CDTL-27ze6vx67yxx3h4u2vqx', '1385954566', '1385954566')
#4 call_user_func_array(queryfx, Array of size 6 starting with: { 0 => Object AphrontMySQLiDatabaseConnection }) called at [/opt/apps/phabricator/test/php/libphutil/src/aphront/storage/connection/AphrontDatabaseConnection.php:28]
#5 AphrontDatabaseConnection::query(%Q INTO %T (%LC) VALUES (%Q), INSERT, passphrase_credential, Array of size 12 starting with: { 0 => name }, 'Migrated Repository Credential (UQSW, UQSM, AP, AC, DEL, ECPS, COM, UQSA, CP, ODP, MAPS, OLD, RESFE, LO, PPL, ITSLO, NAVA, NAVI, NAVC, UQOWS, PS, COMM, AT, PUP, OLAS, PH, ODPM, ODPW, EEL, QUAL, UQSI, EDON, GP, LDDASH, TSMF, SUQAA, SUQPL, LEG, SUQI, SUQA, DMS, UQDRUPAL)', 'ssh-key-file', 'provides/ssh-key-file', 'admin', 'admin', '', 'phabricator', '5', '0', 'PHID-CDTL-27ze6vx67yxx3h4u2vqx', '1385954566', '1385954566') called at [/opt/apps/phabricator/test/php/phabricator/src/infrastructure/storage/lisk/LiskDAO.php:1256]
#6 LiskDAO::insertRecordIntoDatabase(INSERT) called at [/opt/apps/phabricator/test/php/phabricator/src/infrastructure/storage/lisk/LiskDAO.php:1123]
#7 LiskDAO::insert() called at [/opt/apps/phabricator/test/php/phabricator/src/infrastructure/storage/lisk/LiskDAO.php:1092]
#8 LiskDAO::save() called at [/opt/apps/phabricator/test/php/phabricator/resources/sql/patches/20131121.repocredentials.2.mig.php:90]
#9 require_once(/opt/apps/phabricator/test/php/phabricator/resources/sql/patches/20131121.repocredentials.2.mig.php) called at [/opt/apps/phabricator/test/php/phabricator/src/infrastructure/storage/management/PhabricatorStorageManagementAPI.php:196]
#10 PhabricatorStorageManagementAPI::applyPatchPHP(/opt/apps/phabricator/test/php/phabricator/resources/sql/patches/20131121.repocredentials.2.mig.php) called at [/opt/apps/phabricator/test/php/phabricator/src/infrastructure/storage/management/PhabricatorStorageManagementAPI.php:171]
#11 PhabricatorStorageManagementAPI::applyPatch(Object PhabricatorStoragePatch) called at [/opt/apps/phabricator/test/php/phabricator/src/infrastructure/storage/management/workflow/PhabricatorStorageManagementUpgradeWorkflow.php:168]
#12 PhabricatorStorageManagementUpgradeWorkflow::execute(Object PhutilArgumentParser) called at [/opt/apps/phabricator/test/php/libphutil/src/parser/argument/PhutilArgumentParser.php:396]
#13 PhutilArgumentParser::parseWorkflowsFull(Array of size 7 starting with: { 0 => Object PhabricatorStorageManagementDatabasesWorkflow }) called at [/opt/apps/phabricator/test/php/libphutil/src/parser/argument/PhutilArgumentParser.php:292]
#14 PhutilArgumentParser::parseWorkflows(Array of size 7 starting with: { 0 => Object PhabricatorStorageManagementDatabasesWorkflow }) called at [/opt/apps/phabricator/test/php/phabricator/scripts/sql/manage_storage.php:120]

PHP Fatal error: Uncaught exception 'Exception' with message 'Process exited with an open transaction! The transaction will be implicitly rolled back. Calls to openTransaction() must always be paired with a call to saveTransaction() or killTransaction().' in /opt/apps/phabricator/test/php/libphutil/src/aphront/storage/connection/AphrontDatabaseTransactionState.php:71
Stack trace:
#0 [internal function]: AphrontDatabaseTransactionState->__destruct()
#1 {main}

thrown in /opt/apps/phabricator/test/php/libphutil/src/aphront/storage/connection/AphrontDatabaseTransactionState.php on line 71

Fatal error: Uncaught exception 'Exception' with message 'Process exited with an open transaction! The transaction will be implicitly rolled back. Calls to openTransaction() must always be paired with a call to saveTransaction() or killTransaction().' in /opt/apps/phabricator/test/php/libphutil/src/aphront/storage/connection/AphrontDatabaseTransactionState.php:71
Stack trace:
#0 [internal function]: AphrontDatabaseTransactionState->__destruct()
#1 {main}

thrown in /opt/apps/phabricator/test/php/libphutil/src/aphront/storage/connection/AphrontDatabaseTransactionState.php on line 71

Event Timeline

zorfling raised the priority of this task from to Needs Triage.
zorfling updated the task description. (Show Details)
zorfling added projects: Phabricator, Passphrase.
zorfling added a subscriber: zorfling.
epriestley triaged this task as Normal priority.

Thanks for the report! Updating and re-running storage upgrade should resolve this, if you haven't already worked around it. Let us know if you run into anything else.