udoh.chigozie
09/08/2026, 10:56 AMRocky
09/08/2026, 10:56 AMlake_autovacuum_grace_period_minutes: This determines how long historical or unreferenced data is kept. The default is usually 30 minutes (it was 5 minutes in older versions). If you want to speed up the cleanup of these "future" files, you can temporarily reduce this value:
sql
ADMIN SET FRONTEND CONFIG ("lake_autovacuum_grace_period_minutes" = "5");
* lake_autovacuum_parallel_partitions: Ensures this is set to a value greater than 0 (default is 8) so the vacuum process can run.
2. Manual Cleanup Tool (lake_datafile_gc)
If the automatic vacuum does not remove the files (e.g., if the metadata for those specific files was lost entirely during the cluster crash), you can use the lake_datafile_gc tool. This tool explicitly compares the files in your S3/OSS/HDFS bucket with the Tablet Meta in StarRocks to identify and delete unreferenced data.
Basic Usage:
1. Download the data_gc tool (often found in the StarRocks release package or via the official community link).
2. Run the tool in "audit" mode first (to see what would be deleted):
bash
./bin/meta_tool.sh --operation=lake_datafile_gc \
--root_path="<s3://your-bucket/path>" \
--conf_file=./conf/be.conf \
--do_delete=false
3. Once verified, set --do_delete=true to perform the actual cleanup.
3. Manual Compaction
In some cases, triggering a manual compaction can help the system reconcile its state and mark old versions for vacuuming:
sql
ALTER TABLE <table_name> COMPACT;
Is there an "Issue"?
It is generally *not a bug*; it's a design choice in the Lake architecture to prevent data loss. However, if the files persist for many hours or days despite the AutoVacuum settings, it may indicate that the vacuum process is being throttled or is encountering errors. You can check the FE/BE logs for "Vacuum" or "GC" related errors to confirm.
Note: For shared-nothing (OLAP) clusters where you only use the bucket for BACKUP repositories, the bucket files are managed by the repository retention. You can clean up old snapshots using:
sql
DROP SNAPSHOT <snapshot_name> FROM <repository_name>;
References
• knowledge/admin_and_operation/shared_data_compaction.mdudoh.chigozie
09/24/2026, 5:04 PMRocky
09/24/2026, 5:05 PM