Skip to content

Conversation

@kaka11chen
Copy link
Contributor

Proposed changes

Backport #40641

…che#40641)

When a scanner scheduler is stuck in executing a scan task, other scan
tasks will starve and have no chance to execute, which will affect other
queries. Currently, the scan task hopes to scan as much data as possible
to reduce the overhead of scheduling switching. Currently, it hopes to
obtain up to 10MB of data in `doris_scanner_row_bytes`. However, if a
query scans a table with many rows of data, but the filtering rate is
very high, the filter will eventually filter out a lot of data and will
never get 10MB of data. It will keep getting and executing expression
filtering, which will cause other scan tasks to starve.

The current solution is to check `max_run_time_ms` by
`MonotonicStopWatch`. After executing for a maximum of 1s, it will yield
self's task for other tasks. When the scan task executes some
time-consuming tasks, it needs to slice to do it.
@doris-robot
Copy link

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

Since 2024-03-18, the Document has been moved to doris-website.
See Doris Document.

@kaka11chen
Copy link
Contributor Author

run buildall

@github-actions
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@doris-robot
Copy link

TeamCity be ut coverage result:
Function Coverage: 36.09% (9338/25874)
Line Coverage: 27.66% (76690/277294)
Region Coverage: 26.43% (39343/148841)
Branch Coverage: 23.23% (20020/86196)
Coverage Report: http://coverage.selectdb-in.cc/coverage/328800ecd98f0d6c83e95e47a5a1cc2f9a086409_328800ecd98f0d6c83e95e47a5a1cc2f9a086409/report/index.html

@morningman morningman merged commit 98a1311 into apache:branch-2.1 Sep 30, 2024
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.

3 participants