- Retry when connection check fails on checkout
- Optimize the internal get requests queue.
- Compatible with Tokio 1.0
- Add a new method
into_inner
toconnection
to unwrap the raw connection.
- Upgrade the
future-timer
.
- Add a sync hook
validate
in theManager
trait to quickly determine connections are still valid when check-in
- Fix get timeout.
- Add a hook to determine connections are valid when check-in.
- Fix PANIC: overflow when subtracting duration from instant.
- Fixes to health checks, add a check interval
- Add a new option to set connection's max idle lifetime.
- Do not run the
check
ifhealth_check
is false.
- Fix performance regression.
- Do health check for the connection before return it.
- Add configure item
health_check
. - Impl Debug for State.
- Add method is_brand_new to Connection, which returns true if the connection is newly established.
- Skip health check of those new connections.
- Switch to
async-trait
- Switch to
futures-timer
- Add more examples
- Export
spawn
;
- Tix tests
* `Pool.set_max_open_conns` - Sets the maximum number of connections managed by the pool.
* `Pool.set_max_idle_conns` - Sets the maximum idle connection count maintained by the pool.
* `Pool.set_conn_max_lifetime` - Sets the maximum lifetime of connections in the pool.
- When specifying a timeout configuration,
None
means that a get connection will never timeout.
- Fix docs
Refactored most of the code, but it was all tested. I'm sorry, some API changes, but in exchange for better experience and performance.
- ConnectionManager is changed to Manager and simplified.
get_executor
are removed.has_broken
are removed.is_valid
tocheck
- Add a provided method
spawn_task
. You might use it when using mobc in runtimes other than tokio-0.2 and async-std.
- The connection pool now initializes without creating a new database connection, which saves a lot of time and resources. So it becomes a synchronization API.
Pool.state()
will now return more detailed statistics.- Some configuration items are changed.
min_idle
tomax_idle
, which means that idle connections over this number will be closedmax_size
tomax_open
. If you set it to 0, the pool will create unlimited new connections if necessary. However, these connections are still limited bymax_idle
when idle
Pool.try_get
are removed.
- Fix Connection recycle.
- Panics if
min_idle
is 0
- Timeout caused by reaping
- Timeout caused by reaping
- Documentation of
mobc::Builder