github-actions[bot] commented on code in PR #69896:
URL: https://github.com/apache/doris/pull/69896#discussion_r4424460818
##########
fe/fe-core/src/main/java/org/apache/doris/statistics/analysis/AnalysisManager.java:
##########
@@ -1525,6 +1535,7 @@ public void replayUpdateRowsRecord(UpdateRowsEvent event)
{
+ "rows for all replica {}, tablets count {}",
olapTable.getName(), tableUpdateRows, replicaNum,
rowsForAllReplica, tabletRows.size());
Review Comment:
[P2] Feed cloud changelog writes into the per-index counter
The new counter is updated only for local `tabletRecords`. Cloud commits
call `updateUpdatedRows(updatedRows, ...)` with a table-level value from
meta-service `calc_table_stats`, and that helper sums only `base_tablet_ids`,
so attached changelog rowsets are never added. Immediately after a cloud load,
before the asynchronous tablet-stat refresh reports the changelog index,
`getRowCountWithDeltaRows` therefore returns zero for a changelog scan even
though rows are visible. Extend the cloud commit/statistics path to report
changelog rows per index (or carry them in the existing response) before
relying on this accumulator.
##########
be/src/storage/task/engine_publish_version_task.cpp:
##########
@@ -248,6 +250,18 @@ Status EnginePublishVersionTask::execute() {
tablet_id_to_num_delta_rows.insert(
{rowset_meta_ptr->tablet_id(),
rowset_meta_ptr->num_rows()});
}
+ // A load which writes a changelog keeps its changelog rowset on
the base tablet's
+ // transaction info instead of committing a changelog tablet of
its own, so its rows are
+ // reported separately below, once the publish tasks have
finished: a merge-on-write
+ // publication can still append changelog segments to that rowset.
The frontend cannot
+ // derive them from the rows it loaded into the base tablets -- an
update writes change
+ // rows without adding a base row, and a delete adds none to the
base but at least one
+ // to the changelog -- and it keeps the count to estimate how many
rows a read of the
+ // changelog returns.
Review Comment:
[P2] Preserve attached changelog rows across publish retries
If one tablet publishes successfully and a sibling tablet fails, this vector
is local to the failed execute attempt. `TxnManager::publish_txn` removes the
successful tablet's txn info, `PublishVersionWorkerPool` clears
`table_id_to_tablet_id_to_num_delta_rows` before retrying, and
`PublishVersionDaemon` discards reports from tasks with any error tablet. The
final successful retry therefore contains only the previously failed tablet, so
the already-published tablet's changelog rows are never added to
`TableStatsMeta`. Preserve successful tablets' changelog counts across retries
or report them from the final aggregation so a partial publish cannot
permanently undercount the changelog index.
--
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]