Conversation
Cherry-picked from ClickHouse#28, see the mentioned PR for more details.
|
@alex65536 wouldn't just adding check for if (_pDisp->_stopped || (_pDisp->_currentThreads > 1 && _pDisp->_queue.empty())) |
I don't think so. The bug is that the server is slowly degrading, and the server doesn't need to be stopped in order to reproduce it. So I don't believe that just adding |
OK, but then the fix you submitted won't fix it either, because it's doing the same thing as the destructor would if modified as I suggested. If I'm missing something, please explain in detail, "slowly degrading" does not make sense to me; I admit I have scarce time to spend on this, but I do not want to again merge fix which is not fixing the problem. |
I was not proposing to check it twice. I meant to (1) modify the check in the |
|
Any progress on the review? |
Cherry-picked from ClickHouse#28, see the mentioned PR for more details. Co-authored-by: alexey-milovidov <milovidov@yandex-team.ru>
Cherry-picked from ClickHouse#28, see the mentioned PR for more details. Co-authored-by: alexey-milovidov <milovidov@yandex-team.ru>
|
Just wanted to say thank you for this fix - it also fixes a race condition where the value of |
I noticed that Poco HTTP server becomes slow after some uptime, especially when the load is high. The reason is that there is a race condition when decrementing
_currentThreads. Because of this,_currentThreadsalways becomes bigger than the current number of threads.The fix was already proposed before in the Clickhouse fork, see ClickHouse#28. I have just cherry-picked it to be merged into upstream Poco.