github-actions[bot] commented on code in PR #66250:
URL: https://github.com/apache/doris/pull/66250#discussion_r3774541814
##########
be/src/runtime/runtime_state.cpp:
##########
@@ -349,6 +349,7 @@ Status
RuntimeState::append_error_msg_to_file(std::function<std::string()> line,
if (query_type() != TQueryType::LOAD) {
return Status::OK();
}
+ std::lock_guard<std::mutex> l(_load_error_log_lock);
Review Comment:
[P2] Skip the writer mutex once error logging is capped
This lock now runs before `_num_print_error_rows` rejects rows beyond
`MAX_ERROR_NUM`. A file scan can run multiple scanners for one
`ScannerContext`/`RuntimeState`, so a load with many invalid rows funnels every
post-cap row through this mutex even though that branch never touches the
stream or path. With millions of filtered rows this unnecessarily serializes
scanner workers. Add an atomic over-cap check before acquiring the mutex, then
recheck/claim the slot under the lock so stream creation and the bounded writes
stay serialized.
--
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]