See Releases for the detailed change log and contributors.
mobc-redis
: updatedredis
from 0.24 to 0.28.
- Refactored metrics to use RAII to ensure consistency:
- Fixed the gauges not being decremented back after fallible operations when they fail.
- Fixed some metrics relying on
Conn::close
being manually called.
- Fixed a misleading typo in a section name in the docs.
- Updated
metrics
to 0.22. mobc-redis
: updatedredis
to 0.24.
- Added
Debug
impl forPool
. - Improved idle connections handling when
max_open
is unlimited. - Fixed a bug in idle connections metric.
- Fixed
mobc_pool_connections_opened_total
counter being incremented as a gauge andmobc_pool_connections_open
gauge being incremented as a counter. mobc-redis
: updatedredis
dependency from 0.22 to 0.23.
- Fix typo's in readme
- Update mobc-postgres and mobc-redis to use latest version
- Replaces channels with Sempahores
- Adds metrics
- Support the actix-rt v1.0.
- 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