提交 7beddcea 编写于 作者: K kssenii

Fix bug that caused awful CPU usage

上级 cd0dbcb9
......@@ -40,6 +40,7 @@ static const auto CONNECT_SLEEP = 200;
static const auto RETRIES_MAX = 20;
static const uint32_t QUEUE_SIZE = 100000;
static const auto MAX_FAILED_READ_ATTEMPTS = 10;
static const auto RESCHEDULE_MS = 500;
static const auto MAX_THREAD_WORK_DURATION_MS = 60000;
namespace ErrorCodes
......@@ -700,7 +701,7 @@ void StorageRabbitMQ::streamingToViewsFunc()
/// Wait for attached views
if (!stream_cancelled)
streaming_task->schedule();
streaming_task->scheduleAfter(RESCHEDULE_MS);
}
......
......@@ -118,7 +118,6 @@ private:
std::once_flag flag; /// remove exchange only once
std::mutex task_mutex;
BackgroundSchedulePool::TaskHolder streaming_task;
BackgroundSchedulePool::TaskHolder heartbeat_task;
BackgroundSchedulePool::TaskHolder looping_task;
std::atomic<bool> stream_cancelled{false};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册