fix: Create the database directory if it doesn't already exist

pull/24376/head
Carol (Nichols || Goulding) 2020-11-10 11:32:58 -05:00
parent 0532821ed9
commit d7789d5cac
1 changed files with 3 additions and 0 deletions

View File

@ -3,6 +3,7 @@
use tracing::{debug, info};
use std::env::VarError;
use std::fs;
use std::net::SocketAddr;
use std::sync::Arc;
@ -26,6 +27,8 @@ pub async fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
path.into_os_string().into_string().unwrap()
}
};
fs::create_dir_all(&db_dir)?;
debug!("InfluxDB IOx Server using database directory: {:?}", db_dir);
let storage = Arc::new(WriteBufferDatabases::new(&db_dir));