-
Notifications
You must be signed in to change notification settings - Fork 410
Description
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
If the user set the config file with
[storage]
[storage.main]
dir = "/data0/db"
# Should be: dir = ["/data0/db"]
[storage.raft]
dir = "/data0/db"
# Should be: dir = ["/data0/db"]
If storage.main.dir,storage.latest.dir,storage.raft.dir is a string instead of string-array, TiFlash now consider it is an empty array without any warning/exception.
https://github.com/pingcap/tics/blob/fb00fbba50d802164a975daa3107478888ae0e25/dbms/src/Server/StorageConfigParser.cpp#L124-L135
We should check whether the dirs under "storage" configuration is a string array or not. If not, make TiFlash quit and tell the users to correct their configuration file.
In one scenario, users set ...
path="/data0/db"
raft.kvstore_path="/data0/kvstore"
in their cluster, after upgrading to v5.4.0, they replace those configurations with ...
[storage]
[storage.main]
dir = ["/data0/db"]
[storage.raft]
dir = "/data0/kvstore" # Should be: dir = ["/data0/kvstore"]
with the later configuration, TiFlash consider "storage.raft.dir" as an empty array and set it to "/data0/db/kvstore", which is not the same as upgrade before.