Skip to content

branch-4.1: [feature](workload) Support remote scan bytes breaker in workload policy #64649#65064

Open
github-actions[bot] wants to merge 1 commit into
branch-4.1from
auto-pick-64649-branch-4.1
Open

branch-4.1: [feature](workload) Support remote scan bytes breaker in workload policy #64649#65064
github-actions[bot] wants to merge 1 commit into
branch-4.1from
auto-pick-64649-branch-4.1

Conversation

@github-actions

@github-actions github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Cherry-picked from #64649

…icy (#64649)

### What problem does this PR solve?

Issue Number: None

Related PR: None

Problem Summary:

This PR adds a new workload policy condition
`be_scan_bytes_from_remote_storage`, which allows Doris to cancel
queries according to the amount of data read from remote storage by BE
scan tasks. This is useful for limiting external table queries that read
too much remote HDFS or object storage data.

Implementation summary:

- Add a new BE-side workload metric type in thrift for remote storage
scan bytes.
- Add FE workload policy parsing, validation, metadata mapping, and
replay support for `be_scan_bytes_from_remote_storage`.
- Add BE workload condition evaluation based on
`io_context()->scan_bytes_from_remote_storage()`.
- Add regression coverage using an existing Hive external `lineitem`
table.

### Release note

Support workload policy cancellation by BE remote storage scan bytes.

### Check List (For Author)

- Test:
    - FE UT: passed
    - BE UT: passed
    - Regression test: passed, `test_workload_policy_remote_scan_bytes`
- Manual test: verified existing workload policy behavior and new remote
scan bytes cancellation on a deployed Doris instance
- Behavior changed: Yes. Add a new workload policy condition
`be_scan_bytes_from_remote_storage`.
- Does this need documentation: Yes. The workload policy condition list
should be updated.
@github-actions github-actions Bot requested a review from yiguolei as a code owner July 1, 2026 03:35
@hello-stephen

Copy link
Copy Markdown
Contributor

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR.

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

@hello-stephen

Copy link
Copy Markdown
Contributor

run buildall

@hello-stephen

Copy link
Copy Markdown
Contributor

BE Regression && UT Coverage Report

Increment line coverage 95.65% (22/23) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 71.72% (26742/37287)
Line Coverage 55.37% (287559/519336)
Region Coverage 52.82% (240138/454596)
Branch Coverage 54.03% (103699/191944)

@hello-stephen

Copy link
Copy Markdown
Contributor

FE Regression Coverage Report

Increment line coverage 20.00% (4/20) 🎉
Increment coverage report
Complete coverage report

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants