influxdata / influxdata/influxdb

"cannot allocate memory" should be logged with level "error" not with level "info"

Open
#20,424 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
31.7k
Forks
3.7k
Avg merge
13h 37m
Merged PRs (30d)
8

Description

Especially on devices using Flash it may be desirable to raise the log level to avoid unnecessary wear. In that case this would be hidden.

```
ts=2020-12-19T13:29:22.455187Z lvl=info msg="Cache snapshot (start)" log_id=0RA50chW000 engine=tsm1 trace_id=0RAnte5l000 op_name=tsm1_cache_snapshot op_event=start
ts=2020-12-19T13:29:31.010198Z lvl=info msg="Error adding new TSM files from snapshot. Removing temp files." log_id=0RA50chW000 engine=tsm1 trace_id=0RAnte5l000 op_name=tsm1_cache_snapshot error="cannot allocate memory"
ts=2020-12-19T13:29:31.010368Z lvl=info msg="Cache snapshot (end)" log_id=0RA50chW000 engine=tsm1 trace_id=0RAnte5l000 op_name=tsm1_cache_snapshot op_event=end op_elapsed=8555.191ms
ts=2020-12-19T13:29:31.010440Z lvl=info msg="Error writing snapshot" log_id=0RA50chW000 engine=tsm1 error="cannot allocate memory"
```
Encountered with issue looking like #11339

Contributor guide

Open the contributing guide

Research direction

Start by locating the snapshot log entries containing "Error adding new TSM files from snapshot" and "Error writing snapshot". Check how the "cannot allocate memory" failure is logged and verify that the relevant error is emitted at error level rather than info level.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
databases, observability
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
40/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.