-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Enhancement] Optimize vacuum logic by adding vacuum version. (#55764)
## Why I'm doing: The FE (Frontend) will continuously issue vacuum requests to the CN (Compute Node) without any intelligent control, until the `lake_autovacuum_stale_partition_threshold` is reached, which is set to 12 hours by default. This approach presents two issues: 1. **Incomplete Vacuuming**: It is possible that after this time threshold has passed, the partition may not have completed the vacuum process. However, it will no longer be scheduled for vacuuming afterward, leaving some data unprocessed. 2. **Redundant Requests**: It is also possible that the partition has already been vacuumed, but the FE continues to issue vacuum requests indiscriminately. This results in unnecessary requests being sent, which not only wastes resources but also increases S3 API costs. These issues highlight the need for a more intelligent scheduling mechanism to optimize vacuuming efficiency and reduce unnecessary costs. ## What I'm doing: Add `lastSuccVacuumVersion` as the last success vacuum version, which means all garbage files before this version have been vacuumed and FE does not need to resend vacuum request if the `lastSuccVacuumVersion` is catch up the latest version. Signed-off-by: sevev <qiangzh95@gmail.com> (cherry picked from commit 1e54252) # Conflicts: # fe/fe-core/src/main/java/com/starrocks/catalog/PhysicalPartition.java
- Loading branch information
1 parent
611fc09
commit 7d563f0
Showing
7 changed files
with
736 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.