Skip to content

Commit

Permalink
optimize r2d2 pool usage
Browse files Browse the repository at this point in the history
  • Loading branch information
tonyke-bot committed Jan 25, 2024
1 parent 3567ffa commit f9091bf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@

/run.sh
data
redis-data
redis-dataflamegraph.svg
1 change: 1 addition & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,7 @@ fn new_cache_backend_factory(

let conn_pool = r2d2::Pool::builder()
.max_size(300)
.test_on_check_out(false)
.build(client)
.context("fail to create redis connection pool")?;
let factory = RedisBackendFactory::new(chain_id, conn_pool);
Expand Down

0 comments on commit f9091bf

Please sign in to comment.