Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix WorkerTaskExecutorThreadPool#isOverload is incorrect #16027

Merged

Conversation

ruanwenjun
Copy link
Member

@ruanwenjun ruanwenjun commented May 18, 2024

Purpose of the pull request

When we submit a task into ThreadPool, if all core threads has been created(In most of times, the core threads are created.), then the task will be submit into task queue first.
So we cannot use threadPoolExecutor.getQueue().size() > 0 to judge whether the thread pool is busy

Brief change log

  • Use WorkerTaskExecutorHolder to judge whether the worker is overload.

Verify this pull request

Test by UT

@ruanwenjun ruanwenjun force-pushed the dev_wenjun_workerOverloadIsIncorrect branch from a29f849 to 106709a Compare May 18, 2024 06:52
@ruanwenjun ruanwenjun force-pushed the dev_wenjun_workerOverloadIsIncorrect branch from 106709a to 5129e1f Compare May 18, 2024 06:56
@ruanwenjun ruanwenjun self-assigned this May 18, 2024
@ruanwenjun ruanwenjun added bug Something isn't working 3.2.2 labels May 18, 2024
@ruanwenjun ruanwenjun added this to the 3.2.2 milestone May 18, 2024
@ruanwenjun ruanwenjun force-pushed the dev_wenjun_workerOverloadIsIncorrect branch from 5129e1f to d0b7205 Compare May 18, 2024 13:18
@codecov-commenter
Copy link

codecov-commenter commented May 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 40.63%. Comparing base (5463d02) to head (7600008).

Current head 7600008 differs from pull request most recent head a87245f

Please upload reports for the commit a87245f to get more accurate results.

Additional details and impacted files
@@             Coverage Diff              @@
##                dev   #16027      +/-   ##
============================================
+ Coverage     40.59%   40.63%   +0.03%     
- Complexity     5220     5223       +3     
============================================
  Files          1380     1380              
  Lines         46062    46066       +4     
  Branches       4915     4916       +1     
============================================
+ Hits          18699    18719      +20     
+ Misses        25437    25423      -14     
+ Partials       1926     1924       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@Radeity Radeity left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, LGTM.

Copy link
Contributor

@rickchengx rickchengx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link

sonarcloud bot commented May 20, 2024

@ruanwenjun ruanwenjun merged commit b184364 into apache:dev May 20, 2024
62 of 63 checks passed
@ruanwenjun ruanwenjun deleted the dev_wenjun_workerOverloadIsIncorrect branch May 20, 2024 11:13
wangxj3 added a commit that referenced this pull request May 25, 2024
…ASF release (#16042)

* add version of 3.2.2

* Fix rpc channel leak due to concurrent operation (#16021)

* Fix rpc channel leak due to concurrent operation

* Throw channel create failed exception

---------

Co-authored-by: Rick Cheng <rickchengx@gmail.com>

* Fix WorkerTaskExecutorThreadPool#isOverload is incorrect (#16027)

* cp: Reduce the size of tarball to continue ASF release (#15004) (#15540)

* Reduce the size of tarball to continue ASF release

for more detail you can see https://lists.apache.org/thread/rmp7fghlj0n7h9y2v3p8gkw9f9qbo6qt
# Conflicts:
#	tools/dependencies/known-dependencies.txt

* Increase block-until-connected in ZookeeperRegistryTestCase (#16041)

* [Fix][CI] fix the ci error of Values.datasource.profile (#16031)

Co-authored-by: Eric Gao <ericgao.apache@gmail.com>

* Correction of Typos in the Chinese Document Appendix for Task Parameters (#16033)

Co-authored-by: Rick Cheng <rickchengx@gmail.com>

* [DSIP-39][parameter] Improvement startup parameters/global parameters/project parameters data type (#15967)

* [Improvement][parameter] New data types and type filtering

* [Improvement][parameter] Improvement startup parameters/global parameters data type

* fix api interfaces compatible

* add project parameter data type default value

* [Improvement][parameter] New data types and type filtering

* [Improvement][parameter] Improvement startup parameters/global parameters data type

* fix api interfaces compatible

* add project parameter data type default value

* improvement project code

* remove useless imports

* remove method onClearSearchTaskType

* add parameter doc

* optimisation logic

* code conflict resolution

* code conflict resolution

* [Improvement][Monitor] Show master && worker Busy Or Normal Status and Show Commands table list (#15978)

* update

* test

* add monitor enhance ui

* update

* update

* update doc

* fix spotless

* update

* update

* Update dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/DataAnalysisController.java

Co-authored-by: Wenjun Ruan <wenjun@apache.org>

* Update dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/controller/DataAnalysisController.java

Co-authored-by: Wenjun Ruan <wenjun@apache.org>

* Update dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/mapper/ErrorCommandMapper.java

Co-authored-by: Wenjun Ruan <wenjun@apache.org>

* Update dolphinscheduler-dao/src/main/resources/org/apache/dolphinscheduler/dao/mapper/ErrorCommandMapper.xml

Co-authored-by: Wenjun Ruan <wenjun@apache.org>

* Update dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/mapper/CommandMapper.java

Co-authored-by: Wenjun Ruan <wenjun@apache.org>

* Update dolphinscheduler-dao/src/main/resources/org/apache/dolphinscheduler/dao/mapper/ErrorCommandMapper.xml

Co-authored-by: Wenjun Ruan <wenjun@apache.org>

* update

* fix spotless

* update

---------

Co-authored-by: Wenjun Ruan <wenjun@apache.org>

* [Improvement][Monitor] Add UT for montor (#15998)

* formatting Code

* add pom

* Fix NettyRemotingClient might throw IllegalMonitorStateException (#16038)

* Removed unused StateEventHandleFailure (#16052)

* Remove OmitStackTraceInFastThrow in start.sh (#16054)

* Update Chart.yaml Rollback APPversion

* modify log msg (#16062)

Co-authored-by: xiangzihao <460888207@qq.com>

* [DS-16046][fix] Set PreparedStatement parameter type (#16050)

Fix the PreparedStatement parameter is TIME, set it to java.sql.Time

Co-authored-by: Aaron Wang <wangweirao16@gmail.com>
Co-authored-by: Rick Cheng <rickchengx@gmail.com>

* Update pom.xml

* [DSIP-42] Add dolphinscheduler-aws-authentication module  (#16043)

---------

Co-authored-by: wangxj <wangxj31>
Co-authored-by: Wenjun Ruan <wenjun@apache.org>
Co-authored-by: Rick Cheng <rickchengx@gmail.com>
Co-authored-by: Eric Gao <ericgao.apache@gmail.com>
Co-authored-by: TianXinCoord <tianxincoord@163.com>
Co-authored-by: 小可耐 <46134044+sdhzwc@users.noreply.github.com>
Co-authored-by: sleo <97011595+alei1206@users.noreply.github.com>
Co-authored-by: xiangzihao <460888207@qq.com>
Co-authored-by: yinxiaolog <43245392+yinxiaolog@users.noreply.github.com>
Co-authored-by: Aaron Wang <wangweirao16@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants