-
Notifications
You must be signed in to change notification settings - Fork 650
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
DB lock when deleting a dataset which has a running analysis #11051
Comments
Do we need to drop the table synchronously? We could provide a mechanism to cancel an analysis (CartoDB/Windshaft-cartodb#522), but still, any query from the user that we don't control could run into the same situation. We already had a discussion about CDB_UserDataSize performance/problems at https://github.com/CartoDB/cartodb-platform/issues/970. |
I think so. We need to delete the metadata from the table so the user doesn't keep seeing the table in the dashboard. And if we delete the metadata synchronously, but the table itself asynchronously, it's possible that ghost tables will recreate the metadata. We could expose the entire asynchronous thing to the user (show a message telling him that the dataset will be deleted soon), but I don't think we want that.
It is used in a lot of places, certainly all the dashboard pages, to show the disk usage. So we need the data. We could discuss caching it somehow, instead of retrieving it from the database. Yes, cancelling analysis just solved the more visible problems, but is still a problem for long-running queries in general. Maybe the timeout while executing |
This happened to @AbelVM again today, but not with an analysis. Instead, an import from SQL was running when the delete to the original table started running. Again, the account froze. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Context
Happened to @AbelVM while working on a map. He deleted a dataset that still had a geocoding analysis running and his whole account froze up.
Steps to Reproduce
Current Result
Pages don't load at all. They will timeout, and will start working again when the analysis finishes. Looking at the database, it appears what happens is the following:
DROP TABLE
waits until the analysis is finished (trying to obtain an exclusive lock on the table).SELECT cartodb.CDB_UserDataSize('abel')
. That function blocks waiting on theDROP TABLE
End result, everything stops working.
Ideas on what to do here?
CDB_UserDataSize
so it doesn't block if there is a DROP pendingDROP table
so we can cancel it if it gets stuck.cc @CartoDB/builder-backend @CartoDB/dataservices @CartoDB/platform
The text was updated successfully, but these errors were encountered: