Skip to content

chore: use fastpool as object pool impl #6820

Merged
Xuanwo merged 7 commits intomainfrom
bb8-to-fastpool
Nov 25, 2025
Merged

chore: use fastpool as object pool impl #6820
Xuanwo merged 7 commits intomainfrom
bb8-to-fastpool

Conversation

@tisonkun
Copy link
Member

Simplifiy code a lot.

Signed-off-by: tison <wander4096@gmail.com>
Signed-off-by: tison <wander4096@gmail.com>
Signed-off-by: tison <wander4096@gmail.com>
Signed-off-by: tison <wander4096@gmail.com>
Signed-off-by: tison <wander4096@gmail.com>
@tisonkun tisonkun requested a review from Xuanwo as a code owner November 25, 2025 11:58
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. releases-note/chore The PR has a title that begins with "chore" or changes other small things that hard to tell labels Nov 25, 2025
/// Will panic if `max_size` is 0.
#[must_use]
pub fn connection_pool_max_size(mut self, max_size: u32) -> Self {
pub fn connection_pool_max_size(mut self, max_size: usize) -> Self {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a breaking change but I think it's OK. Our next version would be thus 0.56.0.

///
/// default is 10
pub connection_pool_max_size: Option<u32>,
pub connection_pool_max_size: Option<usize>,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto

@TennyZhuang
Copy link
Contributor

Which caused a lot of format changes in doctest?

Signed-off-by: tison <wander4096@gmail.com>
@tisonkun
Copy link
Member Author

Which caused a lot of format changes in doctest?

cargo +nightly fmt --all for format imports. We don't run it in CI so several outdated one are affected.

You can exclude 052cb4c from changeset.

This reverts commit 052cb4c.
@dosubot dosubot bot added size:XL This PR changes 500-999 lines, ignoring generated files. and removed size:L This PR changes 100-499 lines, ignoring generated files. labels Nov 25, 2025
@tisonkun
Copy link
Member Author

Unstable format result. Revert the format commit for later dig in.

options: options.clone(),
},
);

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To add an idle_timeout feature, we may follow-up https://github.com/fast/fastpool/blob/355fb6769c6144220410114de307f5f793b61cb8/examples/postgres/src/main.rs#L40-L59

But let's only add it when it's really needed.

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Nov 25, 2025
@Xuanwo Xuanwo merged commit 54fb2f5 into main Nov 25, 2025
385 checks passed
@Xuanwo Xuanwo deleted the bb8-to-fastpool branch November 25, 2025 12:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm This PR has been approved by a maintainer releases-note/chore The PR has a title that begins with "chore" or changes other small things that hard to tell size:XL This PR changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants