influxdata / influxdata/influxdb

influxdb 2.x: engine Data config `Validate()` is not called outside tests

Open
#25,700 1 comment 0 reactions 1 assignee Claimed by @gwossum View on GitHub
area/2.x
Dominant language
Rust
Stars
31.7k
Forks
3.7k
Avg merge
13h 37m
Merged PRs (30d)
8

Description

The validate function here should be called in production (otherwise it doesn't have much utility)

https://github.com/influxdata/influxdb/blob/96bade409e73709bd01f9cadf1d745767887bfeb/tsdb/config.go#L184

The place to call it is here after the dirs are setup:

https://github.com/influxdata/influxdb/blob/2ffb108a270b076fafee03fda1a0dd9de631e4ff/storage/engine.go#L113-L117

Then NewEngine needs to be changed to return a `(*Engine, error)` as it can fail now and call sites updated.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.