Skip to content

Commit

Permalink
Inconsistent blob storage warning was wrongly shown (#638)
Browse files Browse the repository at this point in the history
* Inconsistent blob storage warning was wrongly shown

* Add entry to CHANGELOG.md
  • Loading branch information
adzialocha authored Jun 26, 2024
1 parent 1adec6d commit c6098e5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]

Expand Down
7 changes: 5 additions & 2 deletions aquadoggo_cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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. "
);
}
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit c6098e5

Please sign in to comment.