github-actions[bot] commented on code in PR #67542:
URL: https://github.com/apache/doris/pull/67542#discussion_r3955499151
##########
fe/fe-core/src/main/java/org/apache/doris/statistics/analysis/AnalysisInfo.java:
##########
@@ -181,7 +181,7 @@ public enum ScheduleType {
public long endTime;
@SerializedName("rowCount")
- public final long rowCount;
+ public long rowCount;
Review Comment:
[P2] Keep the repaired count on a stable async job object
Making this field mutable is insufficient for SYSTEM partition analysis.
With `auto_analyze_simultaneously_running_task_num > 1`, concurrent
huge-partition fallbacks can snapshot the same zero-valued job and later
replace `analysisJobInfoMap[jobId]` with separate `new
AnalysisInfoBuilder(jobInfo).build()` objects; each replacement also starts a
fresh `indexesRowCount`. A base task can repair its replacement here, then a
rollup task can replay its older zero-valued clone. Because the rollup result
cannot promote the base-table count, finalization persists zero and loses the
base index count even though repair already succeeded. Serial execution still
discards earlier index-count entries. Please keep one canonical job object, or
atomically merge `rowCount` and `indexesRowCount`, with a latch-based
base/rollup huge-partition test.
##########
fe/fe-core/src/main/java/org/apache/doris/statistics/analysis/BaseAnalysisTask.java:
##########
@@ -691,6 +691,8 @@ protected void runQuery(String sql) {
jobInfo = jobInfo == null ? job.jobInfo : jobInfo;
long indexId = info.indexId == -1 ? ((OlapTable)
tbl).getBaseIndexId() : info.indexId;
jobInfo.addIndexRowCount(indexId, colStatsData.count);
+ rejustStaleZeroRowCount(jobInfo, indexId, colStatsData.count,
Review Comment:
[P1] Preserve stale-zero invalidation when a task produces no result
This repair only runs after a `ColStatsData` exists. For a loaded table
whose job captured `rowCount = 0`, a sampled string value over
`statistics_max_string_column_length` makes the length assertion throw before
this call; `handleSkip()` then uses `taskDoneWithoutData()`, but sync/async job
finalization still copies zero into `TableStatsMeta`/`ColStatsMeta` and an
all-column/all-skipped job can clear `partitionChanged`. Existing empty stats
can therefore remain trusted in the same first-load window without the
concurrent-publish race from the other thread. Please reconcile the count from
a job-scoped source independent of a column result, or preserve prior row-count
metadata and invalidation for no-result tasks, with real sync/async
finalization tests for the skip path.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]