9.2-rc2 Failed Push to Prod
Attempted to deploy to production but the new assignee feature needs to do some heavy lifting in terms of copying data from the users table. New assignee table created, however timed out when trying to clone assignees essentially
One of the logs:
chef-repo (master) $ knife ssh -a ipaddress 'roles:gitlab-fe-deploy-node' 'SKIP_POST_DEPLOYMENT_MIGRATIONS=1 DISABLE_STATEMENT_TIMEOUT=0 sudo -E gitlab-rake db:migrate'
13.68.91.242 == 20170320173259 MigrateAssignees: migrating =================================
13.68.91.242 -- exec_query("SELECT COUNT(*) AS count FROM \"issues\" WHERE \"issues\".\"assignee_id\" = 0")
13.68.91.242 -> 0.0034s
13.68.91.242 -- exec_query("SELECT COUNT(*) AS count FROM \"issues\" WHERE \"issues\".\"assignee_id\" IS NOT NULL AND NOT (EXISTS (SELECT true FROM \"users\" WHERE \"users\".\"id\" = \"issues\".\"assignee_id\"))")
13.68.91.242 -> 1.1897s
13.68.91.242 -- execute(" INSERT INTO issue_assignees(issue_id, user_id)\n SELECT id, assignee_id FROM issues WHERE assignee_id IS NOT NULL\n")
13.68.91.242 rake aborted!
13.68.91.242 StandardError: An error has occurred, all later migrations canceled:
13.68.91.242
13.68.91.242 PG::QueryCanceled: ERROR: canceling statement due to statement timeout
13.68.91.242 CONTEXT: SQL statement "SELECT 1 FROM ONLY "public"."users" x WHERE "id" OPERATOR(pg_catalog.=) $1 FOR KEY SHARE OF x"
13.68.91.242 : INSERT INTO issue_assignees(issue_id, user_id)
13.68.91.242 SELECT id, assignee_id FROM issues WHERE assignee_id IS NOT NULL
We have since reverted back the deploy node to 9.1.3