Skip to content

Commit

Permalink
linera-views: box aws_sdk_dynamodb futures, which are large
Browse files Browse the repository at this point in the history
  • Loading branch information
Twey committed Apr 1, 2024
1 parent b6ecc4c commit af96fac
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion linera-views/src/dynamo_db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ use aws_sdk_dynamodb::{
Client,
};
use aws_smithy_types::error::operation::BuildError;
use futures::future::join_all;
use futures::future::{join_all, FutureExt as _};
use linera_base::ensure;
use thiserror::Error;
#[cfg(with_testing)]
Expand Down Expand Up @@ -538,6 +538,7 @@ impl DynamoDbStoreInternal {
.expression_attribute_values(":prefix", AttributeValue::B(Blob::new(key_prefix)))
.set_exclusive_start_key(start_key_map)
.send()
.boxed()
.await?;
Ok(response)
}
Expand All @@ -553,6 +554,7 @@ impl DynamoDbStoreInternal {
.table_name(&self.namespace)
.set_key(Some(key_db))
.send()
.boxed()
.await?;

match response.item {
Expand All @@ -576,6 +578,7 @@ impl DynamoDbStoreInternal {
.set_key(Some(key_db))
.projection_expression(PARTITION_ATTRIBUTE)
.send()
.boxed()
.await?;

Ok(response.item.is_some())
Expand Down

0 comments on commit af96fac

Please sign in to comment.