a half-created database directory (has .dolt/ but no repo_state.json - e.g. a CREATE DATABASE interrupted by server shutdown) makes every INFORMATION_SCHEMA query against healthy databases on the same sql-server fail with Error 1105: open ...<dir>/.dolt/repo_state.json: The system cannot find the file specified. regular queries against the healthy DBs still work - it's specifically information_schema, which seems to eagerly open every dir in the data dir.
repro on dolt 2.1.6 (windows, also expect *nix):
mkdir srv && cd srv && mkdir good && (cd good && dolt init && dolt sql -q "create table t (i int primary key)")
mkdir -p broken/.dolt/noms && touch broken/.dolt/noms/LOCK
dolt sql-server --data-dir . --port 13311 &
dolt --host 127.0.0.1 --port 13311 --no-tls --use-db good sql -q "select count(*) from information_schema.columns where table_schema='good'"
# -> Error 1105 (HY000): open .../broken/.dolt/repo_state.json: The system cannot find the file specified.
hit in the wild: an interrupted create left such a dir in a multi-database data dir, and on the next server start every client that touches information_schema failed across all ~20 databases (the client app runs an information_schema check on connect, so it couldn't open anything). recovery was just moving the broken dir out of the data dir.
would expect the broken dir to be skipped (with a warning) rather than failing unrelated queries. happy to provide more detail or test a patch.
a half-created database directory (has
.dolt/but norepo_state.json- e.g. aCREATE DATABASEinterrupted by server shutdown) makes everyINFORMATION_SCHEMAquery against healthy databases on the same sql-server fail withError 1105: open ...<dir>/.dolt/repo_state.json: The system cannot find the file specified. regular queries against the healthy DBs still work - it's specifically information_schema, which seems to eagerly open every dir in the data dir.repro on dolt 2.1.6 (windows, also expect *nix):
hit in the wild: an interrupted create left such a dir in a multi-database data dir, and on the next server start every client that touches information_schema failed across all ~20 databases (the client app runs an information_schema check on connect, so it couldn't open anything). recovery was just moving the broken dir out of the data dir.
would expect the broken dir to be skipped (with a warning) rather than failing unrelated queries. happy to provide more detail or test a patch.