diff --git a/src/Common/ConcurrentBoundedQueue.h b/src/Common/ConcurrentBoundedQueue.h index e15aa462f1c..4e422f7482e 100644 --- a/src/Common/ConcurrentBoundedQueue.h +++ b/src/Common/ConcurrentBoundedQueue.h @@ -45,7 +45,7 @@ private: } else { - push_condition.wait(queue_lock, [&](){ return is_finished || queue.size() < max_fill; }); + push_condition.wait(queue_lock, predicate); } if (is_finished) diff --git a/src/Coordination/KeeperStateMachine.cpp b/src/Coordination/KeeperStateMachine.cpp index 0a15b504128..fe64f8afde7 100644 --- a/src/Coordination/KeeperStateMachine.cpp +++ b/src/Coordination/KeeperStateMachine.cpp @@ -122,7 +122,7 @@ nuraft::ptr KeeperStateMachine::commit(const uint64_t log_idx, n LOG_DEBUG(log, "Session ID response {} with timeout {}", session_id, session_id_request.session_timeout_ms); response->session_id = session_id; if (!responses_queue.push(response_for_session)) - LOG_WARNING(log, "Could not push response {} into responses queue", session_id); + throw Exception(ErrorCodes::SYSTEM_ERROR, "Could not push response with session id {} into responses queue", session_id); } } else