First, after table is dropped, it will stay in Catalog Recycle bin for a while, configured be FE config "catalog_trash_expire_second", default is 86400. After that, the table will be dropped from Catalog, and data will be moved to BE's trash. And then, the BE's trash will be cleaned later, configued by BE config "trash_file_expire_time_sec", default is 259200.
If we want to clean the data immediately, we can first modify the FE config "catalog_trash_expire_second" to a smaller value. And we can implement a new command to view and clean BE's trash. For example, we can add a new column in result of "SHOW BACKENDS" to view the trash data size of each BE. And a new command such as: "ADMIN CLEAN BACKEND TRASH 'xxx'" to clean the trash immediately. -- 此致!Best Regards 陈明雨 Mingyu Chen Email: chenmin...@apache.org At 2020-11-20 18:11:31, "ling miao" <lingm...@apache.org> wrote: >Hi folks, > >Currently, when user drop table or partition, Doris will first put the data >in the trash directory, and then wait for the trash directory to be emptied. > >But during operation and maintenance, I found that when I need to clean up >cluster data to release disk resources, I need the following steps: >1. Drop table or partition >2. Log in to the machine >3. Clean up the trash directory > >If there are too many BE nodes in the cluster, the entire process of >releasing disk resources will be extremely slow and cumbersome. > >So I propose whether it is possible to add a function for forcibly dropping >data. After this function is called, the data will be deleted directly >instead of placing the data in the trash directory. > >Looking forward to your reply (*^ω^*) > > >Ling Miao