<@U0A71G31CDV> is there a bug in 3.5.16 shared arc...
# questions-and-troubleshooting
z
@Rocky is there a bug in 3.5.16 shared architechture with the vacuuming unreferenced dropped tables in object store? because I see that when I run CREATE TEMPORARY TABLE and after some time eve drop it manually it vacuums 1st partitoin but keeps others
r
The issue you are describing—where vacuuming only cleans the first partition of a dropped table and leaves others in the object store—is a known area of concern that has seen several fixes in the StarRocks 3.5.x and 4.0 releases. While there isn't a single "headline" bug titled exactly as you described for version 3.5.16, several related issues in the shared-data architecture (Lake Tables) match the symptoms of incomplete cleanup for multi-partitioned or temporary tables: 1. Known Related Issues in 3.5.x * Temporary Partition Cleanup: A bug was identified where temporary partitions (often created during
INSERT OVERWRITE
or dynamic partitioning) were not correctly cleaned up in the FE recycle bin, especially after FE restarts. A fix was introduced in v3.5.12 (#67629), but subsequent edge cases regarding manual drops of multi-partitioned tables have been reported in the community. * Recycle Bin Expiration: In shared architecture,
DROP TABLE
(without
FORCE
) moves table metadata to the FE Recycle Bin. The actual physical deletion of data files (vacuuming) is a background process. If there are many partitions, the vacuuming process can sometimes time out or fail to iterate through all shards if the internal batching logic encounters an error. 2. Suggested Troubleshooting & Workarounds If you are seeing this behavior consistently in 3.5.16, you can try the following: * Use `DROP TABLE ... FORCE`: If you want the data removed immediately from the object store without waiting for the recycle bin period (default 24 hours), use the
FORCE
keyword. This bypasses the recycle bin and triggers immediate metadata and data cleanup.
Copy code
sql
    DROP TEMPORARY TABLE table_name FORCE;
* Check FE Configuration: Ensure your recycle bin and vacuum intervals are not causing long delays: *
catalog_trash_expire_second
(FE): Default is 86400s (24 hours). Data remains in the "trash" before vacuuming begins. *
lake_vacuum_interval_seconds
(FE): Controls how often the vacuum task runs. * Check FE Logs: Search your
fe.log
or
fe.warn.log
for keywords like
Vacuum
,
RecycleBin
, or
shard
. Look for errors related to "fail to delete" or "not exist" which might indicate the vacuum task is getting stuck after the first partition. 3. Recent Improvements (Post 3.5.16) StarRocks has recently added more robust tracking for this in newer versions (like v4.0), including: * Vacuum Metrics: New metrics for
lake_vacuum_batch_size
and
lake_vacuum_retry_count
to help identify where batch deletions are failing (#74112). * Timeout Handling: A fix for BE vacuum tasks that were not properly reporting completion/timeouts back to the FE, which could lead to stalled cleanup cycles (#74694). Recommendation: If this is blocking your storage management, the safest approach for temporary tables is to always use
DROP TABLE ... FORCE
. If the problem persists even with
FORCE
, it is likely a bug in the shard-metadata iteration logic, and I recommend reaching out to the StarRocks community on Slack with your FE logs to verify if a cherry-pick fix is available for your specific environment. References • release_notes/release-3.5.md
z
@Rocky I dont have these metrics what youve mentioned I only have this "
Copy code
# HELP lake_vacuum_active_delete_file_tasks
# TYPE lake_vacuum_active_delete_file_tasks gauge
lake_vacuum_active_delete_file_tasks 0
# HELP lake_vacuum_active_tasks
# TYPE lake_vacuum_active_tasks gauge
lake_vacuum_active_tasks 0
# HELP lake_vacuum_del_file_count
# TYPE lake_vacuum_del_file_count gauge
lake_vacuum_del_file_count 74686
# HELP lake_vacuum_del_file_fails
# TYPE lake_vacuum_del_file_fails gauge
lake_vacuum_del_file_fails 0
# HELP lake_vacuum_del_file_latency
# TYPE lake_vacuum_del_file_latency gauge
lake_vacuum_del_file_latency 0
# HELP lake_vacuum_del_file_latency_80
# TYPE lake_vacuum_del_file_latency_80 gauge
lake_vacuum_del_file_latency_80 0
# HELP lake_vacuum_del_file_latency_90
# TYPE lake_vacuum_del_file_latency_90 gauge
lake_vacuum_del_file_latency_90 0
# HELP lake_vacuum_del_file_latency_99
# TYPE lake_vacuum_del_file_latency_99 gauge
lake_vacuum_del_file_latency_99 0
# HELP lake_vacuum_del_file_latency_999
# TYPE lake_vacuum_del_file_latency_999 gauge
lake_vacuum_del_file_latency_999 0
# HELP lake_vacuum_del_file_latency_9999
# TYPE lake_vacuum_del_file_latency_9999 gauge
lake_vacuum_del_file_latency_9999 0
# HELP lake_vacuum_del_file_max_latency
# TYPE lake_vacuum_del_file_max_latency gauge
lake_vacuum_del_file_max_latency 0
# HELP lake_vacuum_del_file_qps
# TYPE lake_vacuum_del_file_qps gauge
lake_vacuum_del_file_qps 0
# HELP lake_vacuum_delete_txnlog_count
# TYPE lake_vacuum_delete_txnlog_count gauge
lake_vacuum_delete_txnlog_count 10530
# HELP lake_vacuum_delete_txnlog_latency
# TYPE lake_vacuum_delete_txnlog_latency gauge
lake_vacuum_delete_txnlog_latency 0
# HELP lake_vacuum_delete_txnlog_latency_80
# TYPE lake_vacuum_delete_txnlog_latency_80 gauge
lake_vacuum_delete_txnlog_latency_80 0
# HELP lake_vacuum_delete_txnlog_latency_90
# TYPE lake_vacuum_delete_txnlog_latency_90 gauge
lake_vacuum_delete_txnlog_latency_90 0
# HELP lake_vacuum_delete_txnlog_latency_99
# TYPE lake_vacuum_delete_txnlog_latency_99 gauge
lake_vacuum_delete_txnlog_latency_99 0
# HELP lake_vacuum_delete_txnlog_latency_999
# TYPE lake_vacuum_delete_txnlog_latency_999 gauge
lake_vacuum_delete_txnlog_latency_999 0
# HELP lake_vacuum_delete_txnlog_latency_9999
# TYPE lake_vacuum_delete_txnlog_latency_9999 gauge
lake_vacuum_delete_txnlog_latency_9999 0
# HELP lake_vacuum_delete_txnlog_max_latency
# TYPE lake_vacuum_delete_txnlog_max_latency gauge
lake_vacuum_delete_txnlog_max_latency 0
# HELP lake_vacuum_delete_txnlog_qps
# TYPE lake_vacuum_delete_txnlog_qps gauge
lake_vacuum_delete_txnlog_qps 0
# HELP lake_vacuum_deleted_files
# TYPE lake_vacuum_deleted_files gauge
lake_vacuum_deleted_files 472942
# HELP lake_vacuum_metadata_travel_count
# TYPE lake_vacuum_metadata_travel_count gauge
lake_vacuum_metadata_travel_count 32897
# HELP lake_vacuum_metadata_travel_latency
# TYPE lake_vacuum_metadata_travel_latency gauge
lake_vacuum_metadata_travel_latency 0
# HELP lake_vacuum_metadata_travel_latency_80
# TYPE lake_vacuum_metadata_travel_latency_80 gauge
lake_vacuum_metadata_travel_latency_80 0
# HELP lake_vacuum_metadata_travel_latency_90
# TYPE lake_vacuum_metadata_travel_latency_90 gauge
lake_vacuum_metadata_travel_latency_90 0
# HELP lake_vacuum_metadata_travel_latency_99
# TYPE lake_vacuum_metadata_travel_latency_99 gauge
lake_vacuum_metadata_travel_latency_99 0
# HELP lake_vacuum_metadata_travel_latency_999
# TYPE lake_vacuum_metadata_travel_latency_999 gauge
lake_vacuum_metadata_travel_latency_999 0
# HELP lake_vacuum_metadata_travel_latency_9999
# TYPE lake_vacuum_metadata_travel_latency_9999 gauge
lake_vacuum_metadata_travel_latency_9999 0
# HELP lake_vacuum_metadata_travel_max_latency
# TYPE lake_vacuum_metadata_travel_max_latency gauge
lake_vacuum_metadata_travel_max_latency 0
# HELP lake_vacuum_metadata_travel_qps
# TYPE lake_vacuum_metadata_travel_qps gauge
lake_vacuum_metadata_travel_qps 0
# HELP lake_vacuum_queued_delete_file_tasks
# TYPE lake_vacuum_queued_delete_file_tasks gauge
lake_vacuum_queued_delete_file_tasks 0
# HELP lake_vacuum_queued_tasks
# TYPE lake_vacuum_queued_tasks gauge
lake_vacuum_queued_tasks 0
"
r
Based on your description and the metrics you provided, it appears you have encountered a bug or a logic limitation in StarRocks 3.5.16 regarding the lifecycle of Temporary Tables in Shared-Data (Lake) mode. The fact that
lake_vacuum_del_file_fails
is
0
while data remains in your object store indicates that the Vacuum service is not "failing" to delete the files; rather, it does not realize the other partitions should be deleted. The metadata for the subsequent partitions is likely not being correctly registered in the FE's Recycle Bin or is being skipped during the metadata traversal. Analysis of the Situation 1. Temporary Table Lifecycle: In StarRocks,
TEMPORARY
tables are session-bound. While their metadata exists in the FE memory/catalog for that session, their data files in Shared-Data mode are written to the object store (S3/GCS/Azure). 2. The "First Partition" Symptom: This is a known symptom in earlier 3.x versions where the iteration logic for Lake Table metadata would sometimes only process the "primary" or "first" partition when moving objects to the
RecycleBin
. This was often caused by a break in the iteration loop when handling session-bound metadata or temporary table shards. 3. Metrics Interpretation: Your
lake_vacuum_metadata_travel_count
(32,897) shows the service is walking the metadata it knows about. If it finishes the task without errors but misses partitions, the FE has failed to pass those partition IDs to the vacuum task. Recommended Workarounds & Fixes If you are seeing this consistently in 3.5.16, consider the following steps: 1. Use
DROP TABLE ... FORCE
When you manually drop your temporary tables, use the
FORCE
keyword. In Shared-Data mode,
DROP TABLE
moves metadata to a "trash" state for a retention period (default 24h).
FORCE
bypasses the recycle bin and triggers immediate metadata and data cleanup.
Copy code
sql
DROP TEMPORARY TABLE your_table_name FORCE;
Note: This is the most effective way to ensure the FE triggers a full cleanup of all shards immediately. 2. Verify FE Recycle Bin Configuration Check if the partitions are simply waiting for the expiration period. * Check
catalog_trash_expire_second
in FE (Default: 86400 / 24 hours). * If you manually drop the table, it stays in the trash for this duration. If you wait 24 hours, do the other partitions eventually disappear? If not, it is definitely a bug. 3. Check FE Logs for Shard Failures Search your
fe.warn.log
or
fe.log
for any errors during the
DROP
operation or during the vacuum cycle: * Keywords:
LakeTable
,
RecycleBin
,
fail to remove shard
,
vacuum
. * Look for any
NullPointerException
or
ConcurrentModificationException
which might explain why the iteration stops after the first partition. 4. Upgrade to 3.5.17+ or 4.0 There have been several important fixes in the vacuum logic recently: * #73088 (v3.5.17): Fixed a thread-safety issue in lake vacuum that could cause tasks to stall or fail silently. * #74112: Introduced better tracking of vacuum batches. * #67629: Addressed "orphan files" in lake tables where partitions were not correctly added to the vacuum queue. Why you don't see the new metrics The
lake_vacuum_batch_size
and
lake_vacuum_retry_count
metrics were introduced in very recent PRs and are officially part of v4.0 and the upcoming v3.5.17+ / v3.6 releases. Since you are on 3.5.16, you only have the basic file count and latency gauges. Conclusion: This is likely a bug in the metadata-to-recycle-bin logic for temporary lake tables. The best immediate fix is to use
DROP TABLE ... FORCE
.
If the storage remains occupied even after a
FORCE
drop, please reach out to the StarRocks community Slack with your FE logs, as this would indicate an "orphan shard" issue in the LakeStore. References • administration/management/compaction.md