graphql-engine: DB deadlocks during migration

We are attempting to upgrade our hasura engine from v1 to v2 - but we are noticing timeouts and deadlocks when applying migrations in our prod environment. The statement that hangs the DB is the one that drops all the tables storing hasura metadata:

-- This migration enables metadata separation
-- Drops all tables which stores hasura metadata
DROP VIEW hdb_catalog.hdb_role;
DROP TABLE hdb_catalog.hdb_custom_types;
DROP TABLE hdb_catalog.hdb_action_permission
...

The timeouts/deadlocks aren’t an issue in our dev and test environments; we think that it’s our normal prod traffic that is causing the hangups. Do you have any recommendations for how we can avoid these issues without needing a planned outage? And a followup question - once we apply the migration that upgrades to hasura v2, will future migrations need to drop and re-create all the hasura metadata tables? Or is it a one-time thing?

Thanks in advance.

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 31 (15 by maintainers)

Most upvoted comments

Closing this issue since #7711 is fixed and will be out in v2.1.0.