github-actions[bot] commented on code in PR #62661:
URL: https://github.com/apache/doris/pull/62661#discussion_r3378088001
##########
be/src/load/delta_writer/delta_writer.cpp:
##########
@@ -155,10 +161,22 @@ Status BaseDeltaWriter::init() {
return Status::OK();
}
-Status DeltaWriter::write(const Block* block, const DorisVector<uint32_t>&
row_idxs) {
+Status DeltaWriter::write(const Block* block, const DorisVector<uint32_t>&
row_idxs,
+ bool* memtable_flushed) {
+ if (memtable_flushed != nullptr) {
+ *memtable_flushed = false;
+ }
if (UNLIKELY(row_idxs.empty())) {
return Status::OK();
}
+ if (_req.enable_table_memtable_backpressure) {
Review Comment:
This new table-level backpressure also applies to high-priority load
channels. `LoadChannelMgr::add_batch()` explicitly skips
`handle_memtable_flush()` for high-priority channels because blocking here can
make the RPC time out, but receiver-side random-bucket writers set
`enable_table_memtable_backpressure` and then enter this wait unconditionally.
A high-priority stream/load with a short execution timeout can therefore block
behind `table_memtable_flush_pending_count_limit`, defeating the existing
high-priority bypass. Please skip this table-level wait for
`_req.is_high_priority` (or otherwise keep it bounded/non-blocking for
high-priority loads); the same consideration applies to the cloud and v2 writer
paths that use this flag.
##########
be/src/load/memtable/memtable_writer.cpp:
##########
@@ -139,6 +144,9 @@ Status MemTableWriter::write(const Block* block, const
DorisVector<uint32_t>& ro
}
if (UNLIKELY(_mem_table->need_flush())) {
RETURN_IF_ERROR(_flush_memtable());
+ if (memtable_flushed != nullptr) {
Review Comment:
`memtable_flushed` is only set for the `need_flush()` branch, but `write()`
can also flush successfully before insert when the raw-row count would overflow
`int32_t`. Receiver-side random-bucket routing advances only when
`BaseTabletsChannel` sees `memtable_flushed=true`, so this flush path leaves
the partition pinned to the same tablet even though a memtable was just
submitted. Please set the flag for every successful `_flush_memtable()` in this
method, including the raw-row overflow branch.
--
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]