We run a lot of change tracking in production. Nearly all tables are change tracked. This is for purposes of extracting SQL data to Databricks. Other than the CPU overhead, change tracking rarely causes headaches. But when it does, it’s bad.
The problem manifests with spids waiting on COMMIT_TABLE indefinitely. They just hang and hang and cannot be killed.
Full backups against the database “locked up” on these waits cannot occur with the server in this state. The only remedy we’ve been able to come up with is to fail the instance over to a secondary replica in the Availability Group and then reset the replica with the COMMIT_TABLE storm.
The only answer I’ve found online for alleviating this wait type is to attempt to clean up the commit table manually with the “sys.sp_flush_commit_table_on_demand” proc. Guide here - Change Tracking Cleanup – Going Beyond Automatic – SirSQL.net. This has proven useless for the kinds of backups we’re experiencing. I’ve even tried running the proc in a job overnight every minute to constantly flush out the commit table and we’re still experiencing this problem.
Has anyone else run into this? Is there a trick to using the flush commit table on demand proc? Is it possible we’re just running way too much change tracking and there’s no work around here? Thanks!