From c6098e59c888c50aa387abe67026b572905e07ce Mon Sep 17 00:00:00 2001 From: adz Date: Wed, 26 Jun 2024 11:41:19 +0200 Subject: [PATCH] Inconsistent blob storage warning was wrongly shown (#638) * Inconsistent blob storage warning was wrongly shown * Add entry to CHANGELOG.md --- CHANGELOG.md | 1 + aquadoggo_cli/src/main.rs | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 27b2a942a..df383d3a5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Handle connection ids greater than 9 in `Peer` impl of `Human` trait [#634](https://github.com/p2panda/aquadoggo/pull/634) - Check if blob file exists before deleting it from fs [#636](https://github.com/p2panda/aquadoggo/pull/636) +- Inconsistent blob storage warning was wrongly shown [#638](https://github.com/p2panda/aquadoggo/pull/638) ## [0.7.4] diff --git a/aquadoggo_cli/src/main.rs b/aquadoggo_cli/src/main.rs index cc69b1164..b14f5bc8a 100644 --- a/aquadoggo_cli/src/main.rs +++ b/aquadoggo_cli/src/main.rs @@ -75,7 +75,7 @@ async fn main() -> anyhow::Result<()> { fn show_warnings(config: &Configuration, is_temporary_blobs_path: bool) { if config.network.psk.is_some() && config.network.transport == Transport::QUIC { warn!( - "Your node is configured with a pre-shared key and uses QUIC transport. Private + "Your node is configured with a pre-shared key and uses QUIC transport. Private nets are not supported when using QUIC therefore TCP will be enforced. " ); } @@ -103,7 +103,10 @@ fn show_warnings(config: &Configuration, is_temporary_blobs_path: bool) { warn!("Will not connect to given relay addresses when relay mode is enabled."); } - if config.database_url != "sqlite::memory:" && is_temporary_blobs_path { + let is_temporary_database = + config.database_url == "sqlite::memory:" || config.database_url.contains("mode=memory"); + + if !is_temporary_database && is_temporary_blobs_path { warn!( "Your database is persisted but blobs _are not_ which might result in unrecoverable data inconsistency (blob operations are stored but the files themselves are _not_). It is