Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent blob storage warning was wrongly shown #638

Merged
merged 2 commits into from
Jun 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading