multiple instances of tidb-server may use the same temporary directory #13981
Closed
Description
Bug Report
Please answer these questions before submitting your issue. Thanks!
- What did you do?
If possible, provide a recipe for reproducing the error.
Multiple instances of tidb-server may use the same temporary directy.
See
Line 47 in 0e0faee
tidb-server
s have same instance name but in different directory, each of them will share the same folder and the next start of one instance will remove this directory so that another instance may face unexpected problem.
- What did you expect to see?
- different instances in on node use different directories.
- if one tidb-server uses a temporary directory which another is in use, it should panic.
- When tidb-server starts, find a way to safely remove the temporary directory created when it last starts.
- We need ensure that
tidb-server
instance has the READ/WRITE privilege for the directory, otherwise, panic when starts up.
-
What did you see instead?
-
What version of TiDB are you using (
tidb-server -V
or runselect tidb_version();
on TiDB)?
4.0.0-alpha