Page MenuHomePhabricator

Symbol collision in Diviner publisher
Closed, ResolvedPublic

Description

Not sure if this is related to recent changes or just a cache I need to drop, just writing it down so I don't lose it:

[2015-06-19 15:34:50] EXCEPTION: (AphrontDuplicateKeyQueryException) #1062: Duplicate entry 'TZDRQHD7vIWs' for key 'identityHash' at [<phutil>/src/aphront/storage/connection/mysql/AphrontBaseMySQLDatabaseConnection.php:299]
arcanist(head=master, ref.master=f06eea0d8484), phabricator(head=redesign-2015, ref.master=0fd0f171f10f, ref.redesign-2015=7d7e13d79b86), phutil(head=master, ref.master=81eed10bea57)
  #0 AphrontBaseMySQLDatabaseConnection::throwQueryCodeException(integer, string) called at [<phutil>/src/aphront/storage/connection/mysql/AphrontBaseMySQLDatabaseConnection.php:275]
  #1 AphrontBaseMySQLDatabaseConnection::throwQueryException(mysqli) called at [<phutil>/src/aphront/storage/connection/mysql/AphrontBaseMySQLDatabaseConnection.php:181]
  #2 AphrontBaseMySQLDatabaseConnection::executeRawQuery(string) called at [<phutil>/src/xsprintf/queryfx.php:6]
  #3 queryfx(AphrontMySQLiDatabaseConnection, string, string, string, array, string)
  #4 call_user_func_array(string, array) called at [<phutil>/src/aphront/storage/connection/AphrontDatabaseConnection.php:28]
  #5 AphrontDatabaseConnection::query(string, string, string, array, string) called at [<phabricator>/src/infrastructure/storage/lisk/LiskDAO.php:1261]
  #6 LiskDAO::insertRecordIntoDatabase(string) called at [<phabricator>/src/infrastructure/storage/lisk/LiskDAO.php:1106]
  #7 LiskDAO::insert() called at [<phabricator>/src/infrastructure/storage/lisk/LiskDAO.php:1075]
  #8 LiskDAO::save() called at [<phabricator>/src/applications/diviner/storage/DivinerLiveSymbol.php:168]
  #9 DivinerLiveSymbol::save() called at [<phabricator>/src/applications/diviner/publisher/DivinerLivePublisher.php:148]
  #10 DivinerLivePublisher::createDocumentsByHash(array) called at [<phabricator>/src/applications/diviner/publisher/DivinerPublisher.php:151]
  #11 DivinerPublisher::publishAtoms(array) called at [<phabricator>/src/applications/diviner/workflow/DivinerGenerateWorkflow.php:583]
  #12 DivinerGenerateWorkflow::publishDocumentation(boolean, DivinerLivePublisher) called at [<phabricator>/src/applications/diviner/workflow/DivinerGenerateWorkflow.php:213]
  #13 DivinerGenerateWorkflow::generateBook(string, PhutilArgumentParser) called at [<phabricator>/src/applications/diviner/workflow/DivinerGenerateWorkflow.php:80]
  #14 DivinerGenerateWorkflow::execute(PhutilArgumentParser) called at [<phutil>/src/parser/argument/PhutilArgumentParser.php:406]
  #15 PhutilArgumentParser::parseWorkflowsFull(array) called at [<phutil>/src/parser/argument/PhutilArgumentParser.php:301]
  #16 PhutilArgumentParser::parseWorkflows(array) called at [<phabricator>/scripts/diviner/diviner.php:21]

Revisions and Commits

Event Timeline

epriestley raised the priority of this task from to Normal.
epriestley updated the task description. (Show Details)
epriestley added a project: Diviner.
epriestley added subscribers: epriestley, joshuaspence.

Hitting this locally too, and using --clean may have been inadvisable since it nuked all the docs.

@joshuaspence, pretty sure that's the right fix but yell if it looks suspicious?

We should maybe make this harder to get wrong, e.g. use getBookKey() for methods that return "phabdev", getBookPHID() for methods that return a PHID and getBook() for stuff that returns a LiveBook object.