为何UnsafeDestroyRange有一定概率删数据删不干净?

之前看 tidb gc 代码时候也有为啥需要两次调用 UnsafeDestroyRange 的疑问:

1. 第一次是按照 safepoint 执行 UnsafeDestroyRange
2. 第二次是在 safepoint 24 小时之后

这个 rfc 有解释为什么第一次不能完全清理完成:

And why do we need to check it one more time after 24 hours? After deleting the range the first time, if coincidentally PD is trying to move a Region or something, some data may still appear in the range. So check it one more time after a proper time to greatly reduce the possibility.

IO 打满可能是由 compaction 导致:

After deleting all files in a very-large range, it may trigger RocksDB’s compaction (even it is not really needed) and even cause stalling.