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:ย 

Managed Disaster Recovery

yxnz1e
New Contributor II

Hi, 

I have been doing testing on Managed DR, just few questions that i'm unable to find solution for:
1. I have observed that it takes more time in replication for empty catalogs rather than catalogs that have some data, does replication get stuck somewhere?
2. I had a metastore created for primary workspace which i eventually deleted and created new one, although the workspace picked up the new metastore, when i created failover group & tried to delete it, i got the error:

yxnz1e_0-1790318716914.png

apparently this metastore ID belongs to the metastore i deleted. Then if i delete the workspace will the failover group be deleted too?



3 REPLIES 3

ThomazNeto
Databricks Partner

Hi,

I've tested managed DR as well, and the docs cover less of this than you'd hope, so here's what they do say.

1. Slow replication on empty catalogs. The docs don't explain this directly, but two details help. The replication point is group-wide: it "shows the last time all in-scope resources were copied together." So an empty catalog only shows as replicated once the whole cycle finishes. Also, the system table doesn't track individual catalogs: it "does not list which individual objects replicated successfully," and a null lag means "at least one asset has never been replicated." To tell whether it's actually stuck or just waiting on the cycle, check the errors column:

 
sql
SELECT event_time, replication_state, replication_lag_ms, errors
FROM system.replication.states
WHERE failover_group_name LIKE '%<your-group>%'
ORDER BY event_time DESC;

The table can take up to 3 hours to populate. If you see a rising lag with no errors, that's worth raising with your account team.
link doc

2. The error about the deleted metastore. The failover group records the metastores it manages (metastore_ids). Swapping the workspace to a new metastore doesn't update the group, so it's still pointing at the one you deleted. The docs don't describe any way to clean that up. There's no force-delete, and nothing on deleting a metastore or workspace that belongs to a failover group. They do say the group sets up a connection and a foreign catalog in each metastore, and that you shouldn't delete those yourself. It's likely that the missing old metastore is what blocks the teardown.
link doc

On deleting the workspace: I wouldn't. The docs never say it cascades to the failover group, so you could end up with an orphaned group, and deleting a workspace can't be undone. Managed DR is gated and enabled by the account team, so they (or a support ticket) are the right channel. Send them the failover group name, the old metastore ID from the error, and the group's current state (probably DELETION_FAILED). This needs a fix on their side.

For future tests, don't reassign or delete a metastore while a failover group references it. The documented teardown is to delete the group first and then turn off Mission Critical on each workspace.

Thomaz A. Rossito Neto
Principal Data Architect & AI Strategy โ€” CI&T
thomazn@ciandt.com
linkedin.com/in/thomaz-antonio-rossito-neto

yxnz1e
New Contributor II

Hi Thomas,
I actually tried deleting the workspace and it works! once the workspaces are deleted, the workspace get de-attached from the failover group making failover group empty and then we can delete it successfully.

Louis_Frolio
Databricks Employee
Databricks Employee

Greetings @yxnz1e, I did some digging and here is what I found.

Thanks for coming back with your test results, and thanks to ThomazNeto for the groundwork. His read of the docs holds up on both points, so I'll build on it rather than repeat it.

  1. Empty catalogs taking longer

Slower doesn't mean stuck. The replication point is aggregate: it only advances once every in-scope asset has been copied together, and during INITIAL_REPLICATION the replication_lag_ms column stays NULL until each asset has replicated at least once. The errors column is the real indicator of a blocking problem. A NULL lag with no errors is normal early on. A lag that keeps climbing, or a group that sits in INITIAL_REPLICATION well past your other tests, is the thing to raise with your account team.

Two things can also skew a small test. Creating a group provisions a connection and a foreign catalog in each metastore and runs a first full cycle before the group goes ACTIVE, and that fixed overhead is the same whether the catalog holds zero rows or a few thousand. And system.replication.states can run up to three hours behind, so if you're timing from the system table, that delay alone can swamp the difference between two small catalogs. For the live view, use the failover group's detail page under Resilience in the account console. For the latest status event, this is the docs' query (the name is fully qualified and starts with accounts/..., which is why Thomaz used LIKE๐Ÿ˜ž

SELECT event_time, replication_state, replication_lag_ms, errors
FROM system.replication.states
WHERE failover_group_name = :group_name
ORDER BY event_time DESC
LIMIT 1;

For future tests, put a schema and a small table in the catalog so there's something concrete to verify in the secondary. The docs recommend a separate read-only monitor workspace in that region, since replicated catalogs are read-only and you can't run compute on the secondary workspace.

  1. The deleted-metastore error

Thomaz's diagnosis matches the API. The failover group object only takes workspace IDs; the metastore IDs the system table shows under managed_assets come from those workspaces, and nothing in the docs says they refresh when a workspace's metastore assignment changes. So the group kept a reference to a metastore that no longer existed, and teardown had nothing to clean up on that side. Deleting the workspace detached it, emptied the group, and let the delete succeed, which fits that picture. Treat it as an observed outcome in a sandbox, though, not a documented cascade. Workspace deletion is irreversible and the docs don't promise it removes the group. In a real environment the path is still the one Thomaz gave: account team or Support, with the group name, state, old and new metastore IDs, workspace IDs, and the full error. I'd report it even though you're unblocked, since a stale metastore reference is something they'd want to know about. (The account-level Disaster Recovery API also has Get and Update on the failover group, and Update takes the workspace set. I haven't tested whether a PATCH can detach a workspace, so ask before relying on it.)

Cleanup now that the group is gone:

  • Check the secondary metastore in Catalog Explorer for leftovers: replica catalogs plus the DR-created connection and foreign catalog (their comment says Databricks DR manages them). The secondary can't hold catalogs sharing names with ones you'll replicate, and leftover securables are a listed cause of DR_INVALID_CONFIGURATION.OVERLAPPING_EXTERNAL_LOCATIONS, so they'll trip your next test. Never remove DR-created objects while a group exists, and confirm with your account team before removing orphans.
  • Turn off Mission Critical on the surviving secondary workspace (Add-ons tab) or you'll keep paying that rate.
  • Going forward, treat a workspace's metastore assignment as frozen while it's in a failover group. Documented order: delete the group, turn off Mission Critical, then make metastore changes.

Thanks for closing the loop. The thread now has a documented workaround for the next person who hits this.

References:

Regards, Louis.