From d623304c392074765088b581eb6fbadb6d00c70d Mon Sep 17 00:00:00 2001 From: Borys Date: Sun, 4 May 2025 11:06:37 +0300 Subject: [PATCH] refactor: add WARNING regarding max_client_iobuf_len flag usage (#5029) --- src/facade/dragonfly_connection.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/facade/dragonfly_connection.cc b/src/facade/dragonfly_connection.cc index fa77ab2cb..c3e0acf7f 100644 --- a/src/facade/dragonfly_connection.cc +++ b/src/facade/dragonfly_connection.cc @@ -1445,7 +1445,12 @@ auto Connection::IoLoop() -> variant { }); } - DCHECK_GT(io_buf_.AppendLen(), 0U); + if (io_buf_.AppendLen() == 0U) { + // it can happen with memcached but not for RedisParser, because RedisParser fully + // consumes the passed buffer + LOG_EVERY_T(WARNING, 10) + << "Maximum io_buf length reached, consider to increase max_client_iobuf_len flag"; + } } } else if (parse_status != OK) { break;