Hey @jiechenz, good timing, we’re mid-cleanup right now. Here’s what we’ve found across two of our XDC secondary clusters:
Staging hub-beta (fully cleaned, all 512 shards):
- Deleted 19.2M orphaned history_tree rows and 250M history_node rows
- Before cleanup: 71M tree rows / 3.1B node rows total
- Pods stabilized after cleanup, history_scheduled_tasks backlog drained
Development hub-beta (in progress, 209/512 shards complete):
- Deleted 86M orphaned history_tree rows and 2.36B history_node rows so far
- Before cleanup: ~8.5B history_node rows, ~296M history_tree rows (sampled from shard 100)
- Still running, heaviest shards hit 25-30M nodes each, taking 60-90 minutes per shard
Methodology: We wrote a script that for each shard builds a temp table of valid run_ids from executions, left-joins against history_tree to find orphans, then deletes matching rows from both history_node and history_tree. Batching at 200 trees per transaction with a 2s sleep between batches to avoid overwhelming Aurora during concurrent XDC replication load.
XDC backlog observation: We can see the replication queue depth via SELECT count(*) FROM replication_tasks on the primary (hub-alpha), this table holds tasks hub-beta hasn’t ACK’d yet. Dev-hub-alpha currently has ~74M queued tasks. History pod logs are dominated by VerifyVersionedTransition errors (mutable state not up to date), suggesting ordering dependencies are causing significant retry churn. The growth rate has dropped from ~8k/min to ~5k/min as we’ve cleaned up Aurora IO pressure, but it hasn’t started draining yet.
Curious whether the VerifyVersionedTransition retry behavior is expected during catch-up from a large backlog, or if there’s something we should tune.