Skip to content
This repository has been archived by the owner on May 3, 2024. It is now read-only.

Commit

Permalink
downgrade "expected" warning message to info message (#589)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
jsteemann committed Mar 20, 2024
1 parent e8d4277 commit be29e85
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions core/formats/columnstore2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -393,9 +393,11 @@ class column_base : public column_reader, private util::noncopyable {
if (irs::IsNull(column_name)) {
column_name = "<anonymous>";
}
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;
}

Expand Down

0 comments on commit be29e85

Please sign in to comment.