Guillaume Bienkowski
09/07/2026, 12:16 PMRocky
09/07/2026, 12:16 PMDELETE request. If S3 Bucket Versioning is enabled, a DeleteObject request does not remove the file; it adds a Delete Marker (tombstone). If StarRocks' background garbage collection (GC) or compaction logic repeatedly attempts to "clean up" what it still perceives as a residual file (or simply executes its cleanup cycle), it will create a new Delete Marker version each time, leading to the clutter you see.
2. Cluster Snapshots & Metadata Rotation:
You mentioned snapshots every 8 hours. In shared-data mode, the Cluster Snapshot feature maintains a consistent state of the cluster in S3.
* StarRocks maintains only the latest snapshot; old ones are "dropped."
* While a snapshot is active, it blocks garbage collection of the data versions it references to ensure restorability.
* When a new snapshot is created and the old one is released, a large backlog of "deletable" files (from previous compactions or loads) may be processed at once, causing a spike in DELETE operations.
3. Primary Key Persistent Index (Shared-data only):
If you are using Primary Key tables with persistent indexes enabled, StarRocks stores index files (SSTables) in S3. These files are frequently compacted and updated. High ingestion or even minor background updates can result in many small index files being created and then deleted shortly after.
4. Metadata File Updates:
StarRocks stores "Tablet Meta" files in S3. Every time a tablet is updated (compaction, load, schema change), a new meta file is written and the old one is scheduled for deletion. With a high bucket/tablet count, this adds up quickly.
──────────
Recommended Investigation Steps
1. Identify the "Target" Files
Check your S3 Server Access Logs or CloudTrail to identify the specific prefixes of the files being deleted:
* .../meta/: These are tablet metadata files. High volume here suggests frequent version updates or many tablets.
* .../data/: These are actual data segments. High volume here indicates frequent compactions.
* .../persistent_index/: (If applicable) This confirms the Primary Key index is the source.
2. Verify S3 Versioning Configuration
If versioning is enabled on your bucket, consider the following:
* Disable versioning if you rely on StarRocks' built-in snapshot/backup features for recovery.
* If you must keep it enabled, configure an S3 Lifecycle Policy to "Permanently delete non-current versions" and "Delete expired object delete markers" after 1–7 days to prevent tombstone bloat.
3. Check Tablet Count and Compaction
A small dataset (50GB) with 200k deletes suggests your data might be fragmented into too many tablets or buckets.
* Run SHOW FRAGMENTS FROM <table_name>; to check the number of tablets.
* Check the compaction score: SHOW PROC '/dbs/<db_id>/<table_id>/partitions';. If MaxCS is high, the system is struggling to merge files.
4. Audit Snapshot Impact
Try temporarily disabling the 8-hour snapshots. If the DELETE volume drops significantly, the issue is likely the snapshot rotation logic or the release of "blocked" garbage data after each snapshot cycle.
5. Configuration Tuning (FE/BE)
Check these parameters in your FE/BE configs:
* FE: catalog_trash_expire_second (Default is usually 86400s / 24h). This controls how long metadata stays in the "recycle bin" before the physical DELETE is sent to S3.
* BE: trash_file_expire_time_sec (Default 24h).Rocky
09/07/2026, 12:16 PMlake_datafile_gc tool may help.
Summary
The 200k+ DELETEs are likely the result of StarRocks cleaning up old metadata/index versions from background compactions, which is being amplified into "tombstone clutter" by S3 Bucket Versioning. Setting up an S3 Lifecycle Policy to prune old versions/markers is the most common fix for this specific cluttering issue.
References
• knowledge/admin_and_operation/shared_data_garbage_cleanup.md
• faq/shared_data_faq.md
• loading/s3.mdGuillaume Bienkowski
09/07/2026, 12:24 PMRocky
09/07/2026, 12:25 PMmeta/123_v1.meta in S3, but I no longer need it. Send a DELETE request."*
* S3 receives the DELETE. Because Versioning is enabled, S3 does not remove the file; it adds a Delete Marker (tombstone).
_ A few minutes later, the Vacuum task runs again. It lists S3 and _still sees* the old versions of that file.
_ StarRocks thinks: _"That file is still there! Delete it again."*
_ S3 adds _another* Delete Marker.
4. Result: This repeats every few minutes (the Vacuum interval), creating 400+ Delete Markers per day for the same file key, bloating your S3 metadata and increasing your API costs/latency.
How to Investigate & Fix
1. Adjust the Vacuum/GC Intervals
You can reduce the frequency of these checks so they don't hit S3 30 times a second. Check these FE configurations:
* `lake_autovacuum_interval_seconds`: (If available in your version) Increase this to reduce the frequency of the Vacuum loop.
* `lake_autovacuum_grace_period_minutes`: This is the safety buffer. If a file was just "unreferenced," StarRocks waits this long before deleting it. Increasing this can batch deletions better.
* `lake_vacuum_batch_size`: (Default 1000). Increasing this (up to 1000) makes each S3 call more efficient by deleting more files per request.
2. Configure S3 Lifecycle to Clean "Delete Markers"
Since you must keep versioning for AWS Backup, you must ensure S3 itself cleans up the mess StarRocks is making. Ensure your Lifecycle Policy has:
* "Delete expired object delete markers": This is critical. When an object has only a delete marker and no other versions, S3 can remove the marker entirely.
* "Permanently delete non-current versions": Set this to 1 day. This ensures that once StarRocks "deletes" a file (adding a marker), the actual data version is purged by S3 24 hours later.
3. Tablet & Metadata Churn
If your 50GB of data is split into too many tablets, every 1-hour update will generate a massive wave of new .meta files.
* Check your tablet count: SHOW FRAGMENTS FROM your_table;
* If you have thousands of tablets for 50GB, you have over-partitioned or over-bucketed. Aim for tablet sizes between 100MB and 1GB. Reducing the tablet count will linearly reduce the number of "meta" files created and deleted.
4. The "Snapshot" Interaction
Your 8-hour snapshots are likely making this worse.
* When a snapshot is active, it "pins" all current meta/data files. StarRocks cannot delete them.
* When the snapshot expires every 8 hours, a massive queue of "to-be-deleted" files is released. The Vacuum process then works overtime to clear them, potentially hitting S3 rate limits.
Recommended Actions
1. Reduce Vacuum Frequency: Increase FE lake_autovacuum_interval_seconds or related GC timers to stop the 3-minute loop.
2. Verify S3 Lifecycle: Double-check that ExpiredObjectDeleteMarker is set to true in your AWS S3 Lifecycle rule.
3. Optimize Bucketing: If you have many small tablets, re-create the table with fewer buckets to reduce the number of metadata files StarRocks has to track.Rocky
09/07/2026, 12:25 PM