Skip to content

Commit

Permalink
Show 0 TTL warning in background mode
Browse files Browse the repository at this point in the history
Signed-off-by: Alessandro Passaro <alexpax@amazon.co.uk>
  • Loading branch information
passaro committed Apr 18, 2024
1 parent 0ed6c46 commit a49cd60
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion mountpoint-s3/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -645,7 +645,12 @@ where
}
});
if matches!(metadata_cache_ttl, TimeToLive::Duration(Duration::ZERO)) {
tracing::warn!("The '--metadata-ttl 0' setting is no longer supported, is now interpreted as 'minimal', and will be removed in a future release. Use '--metadata-ttl minimal' instead");
const ZERO_TTL_WARNING: &str = "The '--metadata-ttl 0' setting is no longer supported, is now interpreted as 'minimal', and will be removed in a future release. Use '--metadata-ttl minimal' instead";
tracing::warn!("{}", ZERO_TTL_WARNING);
if !args.foreground {
// Ensure warning is visible even when not redirecting logs to stdout.
eprintln!("{}", ZERO_TTL_WARNING);
}
metadata_cache_ttl = TimeToLive::Minimal;
}
filesystem_config.cache_config = CacheConfig::new(metadata_cache_ttl);
Expand Down

0 comments on commit a49cd60

Please sign in to comment.