diff options
author | Quentin Dufour <quentin@deuxfleurs.fr> | 2023-12-27 16:38:27 +0100 |
---|---|---|
committer | Quentin Dufour <quentin@deuxfleurs.fr> | 2023-12-27 16:38:27 +0100 |
commit | dea6cd00399655b6b34545d059005160902bea9e (patch) | |
tree | 4b64aa230fb6da75db2ea8fadda928fc50717cfc /src | |
parent | 7ac24ad913fa081e1bd6f5b042b9da0173dad267 (diff) | |
download | aerogramme-dea6cd00399655b6b34545d059005160902bea9e.tar.gz aerogramme-dea6cd00399655b6b34545d059005160902bea9e.zip |
debug implementationin-memory
Diffstat (limited to 'src')
-rw-r--r-- | src/storage/garage.rs | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/src/storage/garage.rs b/src/storage/garage.rs index d08585f..00b0214 100644 --- a/src/storage/garage.rs +++ b/src/storage/garage.rs @@ -38,13 +38,18 @@ impl IBuilder for GarageBuilder { "aerogramme", ); - let s3_config = aws_config::from_env() + let sdk_config = aws_config::from_env() .region(aws_config::Region::new(self.conf.region.clone())) .credentials_provider(s3_creds) .endpoint_url(self.conf.s3_endpoint.clone()) .load() .await; - let s3_client = aws_sdk_s3::Client::new(&s3_config); + + let s3_config = aws_sdk_s3::config::Builder::from(&sdk_config) + .force_path_style(true) + .build(); + + let s3_client = aws_sdk_s3::Client::from_conf(s3_config); let k2v_config = k2v_client::K2vClientConfig { endpoint: self.conf.k2v_endpoint.clone(), @@ -152,6 +157,15 @@ impl IStore for GarageStore { .read_item(&row_ref.uid.shard, &row_ref.uid.sort) .await { + Err(k2v_client::Error::NotFound) => { + tracing::debug!( + "K2V item not found shard={}, sort={}, bucket={}", + row_ref.uid.shard, + row_ref.uid.sort, + self.bucket, + ); + return Err(StorageError::NotFound); + } Err(e) => { tracing::error!( "K2V read item shard={}, sort={}, bucket={} failed: {}", |