Skip to content

Commit

Permalink
fix: Remove custom lake s3 client entirely (#699)
Browse files Browse the repository at this point in the history
My previous PR still maintained the shared client, which used shared
futures under the hood, but this created a lot of overhead, so I'm
removing the shared client entirely.
  • Loading branch information
morgsmccauley authored Apr 23, 2024
1 parent 11d809c commit 028a336
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
1 change: 0 additions & 1 deletion block-streamer/src/block_stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,6 @@ async fn process_near_lake_blocks(
ChainId::Mainnet => near_lake_framework::LakeConfigBuilder::default().mainnet(),
ChainId::Testnet => near_lake_framework::LakeConfigBuilder::default().testnet(),
}
.s3_client(lake_s3_client)
.start_block_height(start_block_height)
.blocks_preload_pool_size(lake_prefetch_size)
.build()
Expand Down
5 changes: 1 addition & 4 deletions block-streamer/src/lake_s3_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,7 @@ impl SharedLakeS3ClientImpl {
#[async_trait]
impl near_lake_framework::s3_client::S3Client for SharedLakeS3ClientImpl {
async fn get_object_bytes(&self, bucket: &str, prefix: &str) -> GetObjectBytesResult {
// TODO: Re-enable cache implementation once better locking strategy is implemented
self.inner.get_object_bytes_shared(bucket, prefix).await
self.inner.get_object_bytes_cached(bucket, prefix).await
}

async fn list_common_prefixes(
Expand Down Expand Up @@ -233,7 +232,6 @@ mod tests {
use aws_sdk_s3::types::error::NoSuchKey;
use near_lake_framework::s3_client::S3Client;

#[ignore]
#[tokio::test]
async fn deduplicates_parallel_requests() {
let s3_get_call_count = Arc::new(AtomicUsize::new(0));
Expand Down Expand Up @@ -280,7 +278,6 @@ mod tests {
assert_eq!(s3_get_call_count.load(Ordering::SeqCst), 1);
}

#[ignore]
#[tokio::test]
async fn caches_requests() {
let mut mock_s3_client = crate::s3_client::S3Client::default();
Expand Down

0 comments on commit 028a336

Please sign in to comment.