See Releases for the detailed change log and contributors.
mobc: updatedmetricsfrom 0.23 to 0.24.mobc-redis: updatedredisfrom 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::closebeing manually called.
- Fixed a misleading typo in a section name in the docs.
- Updated
metricsto 0.22. mobc-redis: updatedredisto 0.24.
- Added
Debugimpl forPool. - Improved idle connections handling when
max_openis unlimited. - Fixed a bug in idle connections metric.
- Fixed
mobc_pool_connections_opened_totalcounter being incremented as a gauge andmobc_pool_connections_opengauge being incremented as a counter. mobc-redis: updatedredisdependency 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_innertoconnectionto unwrap the raw connection.
- Upgrade the
future-timer.
- Add a sync hook
validatein theManagertrait 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
checkifhealth_checkis 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,
Nonemeans 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_executorare removed.has_brokenare removed.is_validtocheck- 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_idletomax_idle, which means that idle connections over this number will be closedmax_sizetomax_open. If you set it to 0, the pool will create unlimited new connections if necessary. However, these connections are still limited bymax_idlewhen idle
Pool.try_getare removed.
- Fix Connection recycle.
- Panics if
min_idleis 0
- Timeout caused by reaping
- Timeout caused by reaping
- Documentation of
mobc::Builder