databendlabs / databend

๐——๐—ฎ๐˜๐—ฎ, ๐—”๐—ป๐—ฎ๐—น๐˜†๐˜๐—ถ๐—ฐ๐˜€ & ๐—”๐—œ. Modern alternative to Snowflake. Cost-effective and simple for massive-scale analytics. https://databend.com
https://docs.databend.com
Other
7.71k stars 732 forks source link

feat: continue vacuum drop table on per-table cleanup failures #16424

Closed SkyFan2002 closed 2 weeks ago

SkyFan2002 commented 2 weeks ago

I hereby agree to the terms of the CLA available at: https://docs.databend.com/dev/policies/cla/

Summary

If the cleanup process fails for an individual dropped table, the operation should not immediately terminate. Instead, it should continue to process and clean up other tables that can be handled normally.

If the table's files are not successfully cleaned up, the metadata for both the table and the database will be retained.

Tests

Type of change


This change isโ€‚Reviewable

SkyFan2002 commented 2 weeks ago

Why append Db only when table_infos is empty? The comment should explain the reason for it.

@drmingdrmer This is not introduced in this PR, but introduced in #13779. I think it means when a db need to be vacuumed, but no tables in this db, just drop this db from meta.