1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-15 11:22:40 +01:00
Commit graph

3 commits

Author SHA1 Message Date
epriestley
32da29b965 Provide more help around GRANT errors, particularly for missing TEMPORARY TABLE permission
Summary:
Fixes T13622. Figuring out what permissions we have seems difficult, so address this a bit more narrowly:

  - Make the "access denied" error message a bit more helpful.
  - Tailor error handling for the "CREATE TEMPORARY TABLE" statement.

Test Plan:
  - Created a new user, granted them "SELECT ON *.*" but not "CREATE TEMPORARY TABLE", ran `bin/storage upgrade --force --apply phabricator:20210215.changeset.02.phid-populate.php`.
  - Before: fairly opaque error.
  - After: fairly useful error.

Subscribers: PHID-OPKG-gm6ozazyms6q6i22gyam

Maniphest Tasks: T13622

Differential Revision: https://secure.phabricator.com/D21608
2021-03-11 14:55:21 -08:00
epriestley
b3976acc40 Improve performance of "phabricator:20210215.changeset.02.phid-populate.php"
Summary: Ref T13613. Improve the performance of this migration by using a temporary table and an "UPDATE x JOIN y ..." pattern.

Test Plan:
  - Ran on `secure`, got exit after a few seconds since the migration is idempotent and changesets already had PHIDs.
  - Ran on `secure` with the `continue;` commented out, got valid new PHIDs in 53s (from 153s).
  - Tried a larger page size (16K), didn't see any improvement.
  - From "--trace", client PHID generation seems to be the limiting factor.

Subscribers: PHID-OPKG-gm6ozazyms6q6i22gyam

Maniphest Tasks: T13613

Differential Revision: https://secure.phabricator.com/D21570
2021-02-19 07:53:14 -08:00
epriestley
ec5476a01f Add a PHID to Changesets
Summary:
Ref T13605. Changesets currently have no PHID, which limits their ability to use standard API infrastructure.

Give them a PHID, since there's no reason they don't have one other than their age.

Test Plan:
  - Ran migrations, saw PHIDs populated.
  - Created new changesets, saw PHIDs.

Subscribers: PHID-OPKG-gm6ozazyms6q6i22gyam

Maniphest Tasks: T13605

Differential Revision: https://secure.phabricator.com/D21557
2021-02-15 11:11:12 -08:00