pingcap / tidb-tools

tidb-tools are some useful tool collections for TiDB.
Apache License 2.0
289 stars 194 forks source link

sync-diff-inspector: Leaves temporary trash directory around #797

Closed dveeden closed 5 months ago

dveeden commented 6 months ago

Bug Report

After a single run

$ find output
output
output/sync_diff.log
output/checkpoint
output/checkpoint/6c370e134d294532c2980191e114dd9c8b370c40b8960ef01be7d4cd3054efdf
output/fix-on-tidb0
output/fix-on-tidb0/.trash-2024-05-24T11:00:35+02:00
output/fix-on-tidb0/test:t1:0:0-0:0.sql
output/summary.txt

After multiple runs

$ find output/
output/
output/sync_diff.log
output/checkpoint
output/checkpoint/6c370e134d294532c2980191e114dd9c8b370c40b8960ef01be7d4cd3054efdf
output/fix-on-tidb0
output/fix-on-tidb0/.trash-2024-05-24T10:53:56+02:00
output/fix-on-tidb0/.trash-2024-05-24T10:55:26+02:00
output/fix-on-tidb0/.trash-2024-05-24T10:55:26+02:00/test:t1:0:0-0:0.sql
output/fix-on-tidb0/.trash-2024-05-24T10:55:56+02:00
output/fix-on-tidb0/.trash-2024-05-24T10:55:56+02:00/test:t1:0:0-0:0.sql
output/fix-on-tidb0/.trash-2024-05-24T10:55:57+02:00
output/fix-on-tidb0/.trash-2024-05-24T10:55:57+02:00/test:t1:0:0-0:0.sql
output/fix-on-tidb0/.trash-2024-05-24T10:55:58+02:00
output/fix-on-tidb0/.trash-2024-05-24T10:55:58+02:00/test:t1:0:0-0:0.sql
output/fix-on-tidb0/.trash-2024-05-24T10:55:59+02:00
output/fix-on-tidb0/.trash-2024-05-24T10:55:59+02:00/test:t1:0:0-0:0.sql
output/fix-on-tidb0/.trash-2024-05-24T10:56:00+02:00
output/fix-on-tidb0/.trash-2024-05-24T10:56:00+02:00/test:t1:0:0-0:0.sql
output/fix-on-tidb0/test:t1:0:0-0:0.sql
output/summary.txt

I think sync-diff-inspector should cleanup the .trash-*.