Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ActiveRecord::Deadlocked in datablock_storage#delete_column #57679

Open
snickell opened this issue Apr 1, 2024 · 1 comment
Open

ActiveRecord::Deadlocked in datablock_storage#delete_column #57679

snickell opened this issue Apr 1, 2024 · 1 comment

Comments

@snickell
Copy link
Contributor

snickell commented Apr 1, 2024

https://app.honeybadger.io/projects/3240/faults/106033231?q=request.url%3A%22%2Adatablock%2A%22

@snickell
Copy link
Contributor Author

snickell commented Apr 1, 2024

My best hypothesis:

  1. delete_column modifies the columns column of the tables table, and it ALSO modifies entries in the records table to remove the deleted json key.
  2. update_record and create_record ALSO modify the columns column of the tables table (when the new row adds a previously unseen column) and it also modifies one entry in the records table.

Maybe they do these operations in reverse order from each other? If so, the result would be a potential deadlock if they are run at the same time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant