Tanya-W opened a new pull request, #16594:
URL: https://github.com/apache/doris/pull/16594
# Proposed changes
Issue Number: close #xxx
## Problem summary
- **fix problem description:**
When the brpc request reaches BE `FragmentMgr::exec_plan_fragment`, if the
pthread pool thread pool is full, submit thread pool failed, will need bthread
to destruct the member variable `std::shared_ptr<FragmentExecState>
exec_state`, and then `VNodeChannel::close_wait` will be called, but in
`VNodeChannel::close_wait` call `std::this_thread::sleep_for` to wait finish,
when variable `_add_batches_finished` and `_cancelled` value is always false,
the bthread cannot switch out in time, which leads to the exhaustion of the
bthread worker, and finally leads to BE cannot receive new rpc requests.
```
Status VNodeChannel::close_wait(RuntimeState* state) {
...
// waiting for finished, it may take a long time, so we couldn't set a
timeout
while (!_add_batches_finished && !_cancelled) {
std::this_thread::sleep_for(std::chrono::milliseconds(1));
}
...
}
```
- this pr is a temporary solution
use `bthread_usleep` instead of `std::this_thread::sleep_for`
## Checklist(Required)
1. Does it affect the original behavior:
- [ ] Yes
- [ ] No
- [ ] I don't know
3. Has unit tests been added:
- [ ] Yes
- [ ] No
- [ ] No Need
4. Has document been added or modified:
- [ ] Yes
- [ ] No
- [ ] No Need
5. Does it need to update dependencies:
- [ ] Yes
- [ ] No
6. Are there any changes that cannot be rolled back:
- [ ] Yes (If Yes, please explain WHY)
- [ ] No
## Further comments
If this is a relatively large or complex change, kick off the discussion at
[[email protected]](mailto:[email protected]) by explaining why you
chose the solution you did and what alternatives you considered, etc...
--
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]