You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "BiteTheDDDDt (via GitHub)" <gi...@apache.org> on 2025/12/09 02:24:24 UTC

[PR] [Chore](scan) make scanner wait worker timer more more accurate [doris]

BiteTheDDDDt opened a new pull request, #58833:
URL: https://github.com/apache/doris/pull/58833

   ### What problem does this PR solve?
   make scanner wait worker timer more more accurate
   
   This pull request refactors how scanner resource usage counters are updated in `ScannerScheduler::_scanner_scan`. The update logic for scan CPU time and real-time counters is now managed using a deferred execution pattern, ensuring counters are updated immediately after scanning, regardless of how the function exits. This change improves reliability and correctness, especially in error scenarios.
   
   Resource usage counter updates:
   
   * Replaced the manual update of scan CPU time and real-time counters at the end of the function with a `Defer` object that ensures these counters are updated as soon as possible after scanning, even if the function exits early.
   * Removed the previous explicit counter update block at the end of the function, as this is now handled by the deferred logic.
   
   ### Check List (For Author)
   
   - Test <!-- At least one of them must be included. -->
       - [ ] Regression test
       - [ ] Unit Test
       - [ ] Manual test (add detailed scripts or steps below)
       - [ ] No need to test or manual test. Explain why:
           - [ ] This is a refactor/code format and no logic has been changed.
           - [ ] Previous test can cover this change.
           - [ ] No code files have been changed.
           - [ ] Other reason <!-- Add your reason?  -->
   
   - Behavior changed:
       - [ ] No.
       - [ ] Yes. <!-- Explain the behavior change -->
   
   - Does this need documentation?
       - [ ] No.
       - [ ] Yes. <!-- Add document PR link here. eg: https://github.com/apache/doris-website/pull/1214 -->
   
   ### Check List (For Reviewer who merge this PR)
   
   - [ ] Confirm the release note
   - [ ] Confirm test cases
   - [ ] Confirm document
   - [ ] Add branch pick label <!-- Add branch pick label that this PR should merge into -->
   
   


-- 
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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [Chore](scan) make scanner wait worker timer more more accurate [doris]

Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #58833:
URL: https://github.com/apache/doris/pull/58833#issuecomment-3630898489

   # BE Regression && UT Coverage Report
   Increment line coverage `100.00% (8/8)` :tada:
   
   [Increment coverage report](http://coverage.selectdb-in.cc/coverage/58833_444ff2ea0ee17d7dd2523a9a3e3db9d190b217c0_merge/increment_report/index.html)
   [Complete coverage report](http://coverage.selectdb-in.cc/coverage/58833_444ff2ea0ee17d7dd2523a9a3e3db9d190b217c0_merge/report/index.html)
   | Category          | Coverage           |
   |-------------------|--------------------|
   | Function Coverage | 72.23% (24827/34374) |
   | Line Coverage     | 58.97% (260884/442373) |
   | Region Coverage   | 53.94% (217061/402440) |
   | Branch Coverage   | 55.42% (92711/167273) |


-- 
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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [Chore](scan) make scanner wait worker timer more more accurate [doris]

Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #58833:
URL: https://github.com/apache/doris/pull/58833#issuecomment-3630297966

   # BE UT Coverage Report
   Increment line coverage `0.00% (0/8)` :tada:
   
   [Increment coverage report](http://coverage.selectdb-in.cc/coverage/444ff2ea0ee17d7dd2523a9a3e3db9d190b217c0_444ff2ea0ee17d7dd2523a9a3e3db9d190b217c0/increment_report/index.html)
   [Complete coverage report](http://coverage.selectdb-in.cc/coverage/444ff2ea0ee17d7dd2523a9a3e3db9d190b217c0_444ff2ea0ee17d7dd2523a9a3e3db9d190b217c0/report/index.html)
   | Category          | Coverage           |
   |-------------------|--------------------|
   | Function Coverage | 53.34% (18709/35072) |
   | Line Coverage     | 39.05% (172944/442853) |
   | Region Coverage   | 33.71% (134086/397717) |
   | Branch Coverage   | 34.64% (57639/166398) |


-- 
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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [Chore](scan) make scanner wait worker timer more more accurate [doris]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #58833:
URL: https://github.com/apache/doris/pull/58833#issuecomment-3630577321

   PR approved by anyone and no changes requested.


-- 
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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [Chore](scan) make scanner wait worker timer more more accurate [doris]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #58833:
URL: https://github.com/apache/doris/pull/58833#issuecomment-3630577210

   PR approved by at least one committer and no changes requested.


-- 
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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [Chore](scan) make scanner wait worker timer more more accurate [doris]

Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #58833:
URL: https://github.com/apache/doris/pull/58833#issuecomment-3630570541

   # BE Regression && UT Coverage Report
   Increment line coverage `100.00% (8/8)` :tada:
   
   [Increment coverage report](http://coverage.selectdb-in.cc/coverage/58833_444ff2ea0ee17d7dd2523a9a3e3db9d190b217c0_merge/increment_report/index.html)
   [Complete coverage report](http://coverage.selectdb-in.cc/coverage/58833_444ff2ea0ee17d7dd2523a9a3e3db9d190b217c0_merge/report/index.html)
   | Category          | Coverage           |
   |-------------------|--------------------|
   | Function Coverage | 73.10% (25127/34374) |
   | Line Coverage     | 60.24% (266504/442373) |
   | Region Coverage   | 55.84% (224733/402440) |
   | Branch Coverage   | 57.10% (95519/167273) |


-- 
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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [Chore](scan) make scanner wait worker timer more more accurate [doris]

Posted by "Thearas (via GitHub)" <gi...@apache.org>.
Thearas commented on PR #58833:
URL: https://github.com/apache/doris/pull/58833#issuecomment-3629921729

   
   Thank you for your contribution to Apache Doris.
   Don't know what should be done next? See [How to process your PR](https://cwiki.apache.org/confluence/display/DORIS/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?
       


-- 
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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [Chore](scan) make scanner wait worker timer more more accurate [doris]

Posted by "BiteTheDDDDt (via GitHub)" <gi...@apache.org>.
BiteTheDDDDt merged PR #58833:
URL: https://github.com/apache/doris/pull/58833


-- 
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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [Chore](scan) make scanner wait worker timer more more accurate [doris]

Posted by "BiteTheDDDDt (via GitHub)" <gi...@apache.org>.
BiteTheDDDDt commented on PR #58833:
URL: https://github.com/apache/doris/pull/58833#issuecomment-3629925696

   run buildall


-- 
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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


Re: [PR] [Chore](scan) make scanner wait worker timer more more accurate [doris]

Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #58833:
URL: https://github.com/apache/doris/pull/58833#issuecomment-3630694348

   # BE Regression && UT Coverage Report
   Increment line coverage `100.00% (8/8)` :tada:
   
   [Increment coverage report](http://coverage.selectdb-in.cc/coverage/58833_444ff2ea0ee17d7dd2523a9a3e3db9d190b217c0_merge/increment_report/index.html)
   [Complete coverage report](http://coverage.selectdb-in.cc/coverage/58833_444ff2ea0ee17d7dd2523a9a3e3db9d190b217c0_merge/report/index.html)
   | Category          | Coverage           |
   |-------------------|--------------------|
   | Function Coverage | 72.23% (24827/34374) |
   | Line Coverage     | 58.97% (260884/442373) |
   | Region Coverage   | 53.94% (217061/402440) |
   | Branch Coverage   | 55.42% (92711/167273) |


-- 
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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org