Skip to content
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
7 changes: 5 additions & 2 deletions rust/lance-table/src/io/commit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -678,7 +678,7 @@ async fn build_dynamodb_external_store(
) -> Result<Arc<dyn ExternalManifestStore>> {
use super::commit::dynamodb::DynamoDBExternalManifestStore;
use aws_sdk_dynamodb::{
config::{IdentityCache, Region},
config::{retry::RetryConfig, IdentityCache, Region},
Client,
};

Expand All @@ -687,7 +687,10 @@ async fn build_dynamodb_external_store(
.region(Some(Region::new(region.to_string())))
.credentials_provider(OSObjectStoreToAwsCredAdaptor(creds))
// caching should be handled by passed AwsCredentialProvider
.identity_cache(IdentityCache::no_cache());
.identity_cache(IdentityCache::no_cache())
// Be more resilient to transient network issues.
// 5 attempts = 1 initial + 4 retries with exponential backoff.
.retry_config(RetryConfig::standard().with_max_attempts(5));

if let Some(endpoint) = endpoint {
dynamodb_config = dynamodb_config.endpoint_url(endpoint);
Expand Down
10 changes: 9 additions & 1 deletion rust/lance-table/src/io/commit/dynamodb.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ use object_store::path::Path;
use snafu::location;
use snafu::OptionExt;
use tokio::sync::RwLock;
use tracing::warn;

use crate::io::commit::external_manifest::ExternalManifestStore;
use lance_core::error::box_error;
Expand Down Expand Up @@ -82,7 +83,14 @@ where
E: std::error::Error + Send + Sync + 'static,
{
fn wrap_err(self) -> Result<T> {
self.map_err(|err| Error::from(WrappedSdkError(err)))
self.map_err(|err| {
warn!(
target: "lance::dynamodb",
request_id = err.request_id().unwrap_or("unknown"),
"DynamoDB SDK error: {err:?}",
);
Error::from(WrappedSdkError(err))
})
}
}

Expand Down
Loading