You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now, DeploymentStore.transact_block_operations queries information about the block pointer from subgraph_deployment in the same transaction in which it later updates the same row. That causes a lock upgrade. The lock upgrade is fine in normal operations, since there is only one writer per subgraph, but can lead to deadlocks when running migrations that need to lock subgraph_deployment.
To reduce the risk of such a deadlock, the code should be changed to read from subgraph_deployment outside of the write transaction; since we are use the READ_COMMITTED transaction isolation level, reading inside the transaction doesn't really bring any benefit, anyway.