github-actions[bot] commented on code in PR #64649:
URL: https://github.com/apache/doris/pull/64649#discussion_r3502902234
##########
be/src/runtime/workload_management/workload_sched_policy.cpp:
##########
@@ -80,6 +80,12 @@ bool
WorkloadSchedPolicy::is_match(WorkloadAction::RuntimeContext* action_runtim
val =
std::to_string(action_runtime_ctx->resource_ctx->io_context()->scan_bytes());
break;
}
+ // Evaluate the remote read breaker against the existing IO context
remote scan counter.
+ case WorkloadMetricType::SCAN_BYTES_FROM_REMOTE_STORAGE: {
+ val = std::to_string(action_runtime_ctx->resource_ctx->io_context()
+ ->scan_bytes_from_remote_storage());
Review Comment:
This makes the new policy fire on local file scans too. The value here comes
from `scan_bytes_from_remote_storage()`, but
`FileScanner::update_realtime_counters()` currently sends all read bytes to
that counter whenever both file-cache local and remote counters are zero. A
`local()` TVF follows this path: FE emits `FILE_LOCAL`, BE maps that to
`global_local_filesystem()`, `LocalFileReader::read_at_impl()` does not update
file-cache stats, and `TracingFileReader` still increments
`_file_reader_stats->read_bytes`. So
`CONDITIONS(be_scan_bytes_from_remote_storage > 1) ACTIONS(cancel_query)` can
cancel a query that only read local disk. Please make the remote-storage policy
use a counter that only actual remote-backed reads update, or classify
`FILE_LOCAL`/local filesystem fallback bytes as local before this condition can
observe them.
--
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]