deadlock with metadata apply and running subscriptions
See original GitHub issueThis was seen by a user (Howard Wang#8417 Discord) in v1.3.2 when applying metadata:
2020-10-20 18:31:42 UTC:172.17.5.63(54744):t5br6hpuBHCetN33jJczdXRvTwfFXjBpANW5@hasura:[4585]: DETAIL: Process 4585 waits for AccessExclusiveLock on relation 17646 of database 16396; blocked by process 458.
Process 458 waits for AccessShareLock on relation 17824 of database 16396; blocked by process 4585.
Process 4585: DROP FUNCTION IF EXISTS hdb_views.“notify_hasura_channel_post_created_INSERT”() CASCADE
Process 458: SELECT “_subs”.“result_id” , “_fld_resp”.“root” AS “result” FROM UNNEST(($1)::uuid[], ($2)::json[]) AS…
This is causing hasura metadata apply command to fail and hence rollback of the desired upgrade.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:16 (8 by maintainers)
Top Results From Across the Web
Deadlock and schema modification lock - Microsoft Q&A
I have a deadlock that I need some input for ... <metadatalock subresource="PERMISSIONS" classid="class = 0, major_id = 0" dbid="5" id="lock708d967580" ...
Read more >Deadlock in "metadata_cache" table cause the system having ...
Issue simulation: I tried to create multiple "meta_hash_base" records in metadata_cache table. After I login to the system using a new browser instance,...
Read more >How to replicate a SCH_S, SCH_M deadlock - Stack Overflow
The session already holds a SCH-M metadata lock on a user defined type (probably as you created it earlier in the script) and...
Read more >How to report on SQL Server deadlock occurrences
Now, we will need to use collected data in order to build a graph with deadlock occurrences over time. After a little word...
Read more >Deadlocks | Mastering MariaDB - Packt Subscription
Some combinations of locks create a situation where some transactions block each other. Since all the involved transactions are waiting for a lock...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@markerdmann First thanks for working with us on this issue. We have found why
DROP FUNCTIONwas being called needlessly and it turned out to be a CLI issue: https://github.com/hasura/graphql-engine/issues/6115We will fix this ASAP in v1.3.3
Subscription queries look like
SELECT "_subs"."result_id" ...whereasSELECT coalesce(json_agg("root"), '[]) ...are regular queries. If you have the spreadsheet saved from before, then just directly copying that query and running against your prod DB would be safe.Thanks for sending the migrations/metadata, we will continue investigating what might be causing
DROP FUNCTIONto be executed in the first place.