Repository navigation
Commit 2d3f59f
committed
[fix](be) Run the do_submit debug point callback only when one is set
### What problem does this PR solve?
Issue Number: None
Related PR: #68610
Problem Summary: The debug point ThreadPool.do_submit.wait_for_thread_start
called DBUG_RUN_CALLBACK() unconditionally. DebugPoint::execute_callback()
throws std::invalid_argument when no callback is set, so enabling the point by
name without a callback (for example through the HTTP debug point action) made
every submit to a pool that is waiting for its first worker throw out of
ThreadPool::do_submit(). Check dp->callback.has_value() first, as the
ThreadPool.create_thread.inject_failure point next to it already does.
### Release note
None
### Check List (For Author)
- Test: Unit Test
- run-be-ut.sh with ThreadPoolTest.* and ScannerProjectionTest.* (31 tests passed)
- Behavior changed: No
- Does this need documentation: No1 parent 03980e1 commit 2d3f59f
1 file changed
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
442 | 442 | | |
443 | 443 | | |
444 | 444 | | |
445 | | - | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
446 | 448 | | |
447 | 449 | | |
448 | 450 | | |
| |||
0 commit comments