From be29e854156a75b8262c0ffa76157dcb4303688c Mon Sep 17 00:00:00 2001 From: Jan Date: Wed, 20 Mar 2024 19:23:15 +0100 Subject: [PATCH] downgrade "expected" warning message to info message (#589) * downgrade "expected" warning message to info message when there is an attempt to insert data into the columns cache, there is currently no check if the columns cache actually has a size > 0. if the columns cache is configured with a size of 0, then all insert attempts will fail and produce the warning "Failed to allocate memory for buffered column id x, name: x of size x" the warning on its own looks scary, but it is totally expected in case the columns cache is configured with a size of 0 (which is the default value in ArangoDB). this PR changes the message text so it is more clear what could have caused the problem, and also downgrades the log level from WARN to INFO. the message text is now extended with the following text: "This can happen if no columns cache was configured or the column data exceeds the columns cache size." * clang-format * more clang-format --- core/formats/columnstore2.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/core/formats/columnstore2.cpp b/core/formats/columnstore2.cpp index dc2884cb2..eb6fbe81f 100644 --- a/core/formats/columnstore2.cpp +++ b/core/formats/columnstore2.cpp @@ -393,9 +393,11 @@ class column_base : public column_reader, private util::noncopyable { if (irs::IsNull(column_name)) { column_name = ""; } - IRS_LOG_WARN( - absl::StrCat("Failed to allocate memory for buffered column id ", - header().id, " name: ", column_name, " of size ", size)); + IRS_LOG_INFO(absl::StrCat( + "Failed to allocate memory for buffered column id ", header().id, + " name: ", column_name, " of size ", (size + mappings), + ". This can happen if no columns cache was configured or the " + "column data size exceeds the columns cache size.")); return false; }