influxdata / influxdata/influxdb
Intermittent "file already closed" error when creating new segment file for wal
- Dominant language
- Rust
- Stars
- 31.7k
- Forks
- 3.7k
- Avg merge
- 13h 37m
- Merged PRs (30d)
- 8
Description
Reported in community slack [here](https://influxcommunity.slack.com/archives/CH7C56X4Z/p1615973626007200).
This error occurs "regularly" after running InfluxDB v2 (2.0.4) for around a month:
```
influxdbv2/engine/wal//autogen//_.wal: file already closed
```
The logs immediately preceding the error are:
```
Cache snapshot (start)
Cache snapshot (end)
Error writing snapshot
```
Contributor guide
Research direction
Start with the WAL path shown in the error, influxdbv2/engine/wal//autogen//_.wal, and trace new segment creation alongside the preceding cache snapshot messages. Reproduce the month-scale failure if possible and determine why snapshot writing encounters a closed file; done means the reported error no longer occurs during snapshot and segment creation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100