Skip to content

Commit 21acd48

Browse files
committed
server storage validation
Add Guard to disallow the user to run the server in distributed setup with local storage
1 parent a8cbcc6 commit 21acd48

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

server/src/handlers/http/modal/query_server.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -507,9 +507,13 @@ impl QueryServer {
507507
None => Utc::now(),
508508
})
509509
.min()
510-
.unwrap_or(Utc::now());
510+
.unwrap_or_else(|| Utc::now());
511511

512-
let min_time = stats.iter().map(|x| x.time).min().unwrap_or(Utc::now());
512+
let min_time = stats
513+
.iter()
514+
.map(|x| x.time)
515+
.min()
516+
.unwrap_or_else(|| Utc::now());
513517

514518
let cumulative_ingestion =
515519
stats

server/src/main.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ async fn main() -> anyhow::Result<()> {
6868
};
6969

7070
// MODE == Query / Ingest and storage = local-store
71+
server.validate()?;
7172
server.init().await?;
7273

7374
Ok(())

0 commit comments

Comments
 (0)