cancel
Showing results for 
Search instead for 
Did you mean: 
Administration & Architecture
Explore discussions on Databricks administration, deployment strategies, and architectural best practices. Connect with administrators and architects to optimize your Databricks environment for performance, scalability, and security.
cancel
Showing results for 
Search instead for 
Did you mean: 

Bug when re-creating force deleted external location

camilo_s
Contributor

When re-creating an external location that was previously force-deleted (because it had a soft-deleted managed table), the newly re-created external location preserves the reference to the soft-deleted managed table from the previous external location, with no possibility of purging. This will happen for all future external locations that are created with the same name and at the same physical location.

Steps to reproduce:

  1. create external location
  2. create schema on external location
  3. create table on schema
  4. drop table
  5. force-delete external location (forcing is necessary because the reference to the soft-deleted table is retained)
  6. optional: manually delete content (metadata __unitystorage) of physical external location. Optional because it makes no difference if this is done or not)
  7. create new external location with the same name at the same physical location
  8. delete the new external location: it will fail due to a reference to the dependent soft deleted table from the previous external location

I'm aware that the correct way to completely delete a managed table (including references and physical data) is longer (see e.g.  https://docs.databricks.com/en/delta/vacuum.html#purge-metadata-only-deletes-to-force-data-rewrite) but it's very unintuitive for Unity Catalog to maintain the reference to soft deleted tables past external location deletion hardcoded through external location name + physical location.

Normally (e.g. for Azure resources) soft deleted objects should still be readable so that one can still act on them (e.g. for purging or restoring). How does Databricks handle this? And equally importantly where is the metadata for this association to soft-deleted objects stored?

Does anyone know a workaround, or is that external location name burnt forever?

0 REPLIES 0

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you won’t want to miss the chance to attend and share knowledge.

If there isn’t a group near you, start one and help create a community that brings people together.

Request a New Group