This is an automated email from the ASF dual-hosted git repository.
morrysnow pushed a commit to branch branch-3.1
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-3.1 by this push:
new cc05b96cec4 branch-3.1: [fix](statistics)Fix drop expired stats.
#54424 (#54442)
cc05b96cec4 is described below
commit cc05b96cec4e4831fef5d5e81f3a6de62841cae9
Author: github-actions[bot]
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Thu Aug 7 20:23:03 2025 +0800
branch-3.1: [fix](statistics)Fix drop expired stats. #54424 (#54442)
Cherry-picked from #54424
Co-authored-by: James <[email protected]>
---
.../main/java/org/apache/doris/statistics/StatisticsCleaner.java | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/statistics/StatisticsCleaner.java
b/fe/fe-core/src/main/java/org/apache/doris/statistics/StatisticsCleaner.java
index e5ab2851ea3..a2fea570acb 100644
---
a/fe/fe-core/src/main/java/org/apache/doris/statistics/StatisticsCleaner.java
+++
b/fe/fe-core/src/main/java/org/apache/doris/statistics/StatisticsCleaner.java
@@ -95,12 +95,11 @@ public class StatisticsCleaner extends MasterDaemon {
private void clearStats(OlapTable statsTbl, boolean isTableColumnStats) {
ExpiredStats expiredStats;
- long offset = 0;
do {
expiredStats = new ExpiredStats();
- offset = findExpiredStats(statsTbl, expiredStats, offset,
isTableColumnStats);
+ findExpiredStats(statsTbl, expiredStats, 0, isTableColumnStats);
deleteExpiredStats(expiredStats, statsTbl.getName(),
isTableColumnStats);
- } while (!expiredStats.isEmpty());
+ } while (expiredStats.isFull());
}
private void clearTableStats() {
@@ -325,6 +324,9 @@ public class StatisticsCleaner extends MasterDaemon {
}
}
this.yieldForOtherTask();
+ if (expiredStats.isFull()) {
+ LOG.info("expiredStats is full.");
+ }
}
return pos;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]