github-actions[bot] commented on code in PR #70408:
URL: https://github.com/apache/doris/pull/70408#discussion_r4680529099
##########
be/src/storage/segment/variant/variant_column_reader.cpp:
##########
@@ -1486,7 +1514,9 @@ Status
VariantColumnReader::load_external_meta_once(OlapReaderStatistics* stats,
// A retry skips paths already merged by load_all.
_external_meta_load_once.emplace();
}
- return status;
+ RETURN_IF_ERROR(status);
+ return
check_variant_serialize_type_layout(_tablet_schema->column_by_uid(_root_unique_id),
Review Comment:
[P2] Cache layout validation with the external metadata load
For a valid V2/count-zero column with a `MATCH_NAME_GLOB 't_*':INT`
template, typed paths bypass the dynamic budget, so a V3 segment can have N
materialized typed leaves. Flat-leaf compaction calls
`load_external_meta_once()` for each leaf through
`_build_read_plan_flat_leaves()`, but this full-tree validation runs after
`DorisCallOnce` and still under the exclusive `_subcolumns_meta_mutex`. It
therefore repeats an N-leaf scan N times even after metadata has loaded
successfully, adding O(N^2) setup work per input segment and holding the shared
reader's metadata lock for each scan. Validate after `load_all()` inside the
cached callback (preserving memory-limit retries), so the immutable loaded
layout is checked once.
--
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]