github-actions[bot] commented on code in PR #64620:
URL: https://github.com/apache/doris/pull/64620#discussion_r3432338924
##########
be/src/exec/sink/writer/vtablet_writer_v2.cpp:
##########
@@ -687,7 +687,9 @@ Status VTabletWriterV2::close(Status exec_status) {
std::unordered_map<int64_t, int32_t> segments_for_tablet;
SCOPED_TIMER(_close_writer_timer);
// close all delta writers if this is the last user
- auto st = _delta_writer_for_tablet->close(segments_for_tablet,
_operator_profile);
+ RuntimeProfile* delta_writer_profile =
+ _state->profile_level() >= 2 ? _operator_profile : nullptr;
Review Comment:
`profile_level` defaults to 2 even when profiling is disabled
(`enable_profile=false` is the FE default), so this still passes
`_operator_profile` for normal unprofiled loads. `DeltaWriterV2::close_wait()`
then creates a `DeltaWriterV2` child and `MemTableWriter::close_wait()` creates
another child profile per tablet, even though the rest of this writer and
`VRowDistribution` gate detailed profile work with `_state->enable_profile() &&
_state->profile_level() >= 2`. Please include `enable_profile()` in this gate
so the per-tablet detailed profiles are only built when profile collection is
enabled.
--
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]