Releases: general-CbIC/poolex
Releases · general-CbIC/poolex
[1.4.2] Make it more stable
What's changed
Changed
- Improved worker startup handling by returning state alongside worker PID or error, ensuring state consistency during worker creation and handling of failed worker starts. This prevents potential deadlocks when workers fail to start.
- Refactored worker down handling logic by extracting different scenarios into dedicated functions for better code readability and maintainability.
Fixed
- Fixed incorrect typespecs in
Poolex.Private.IdleOverflowedWorkers.count/1andPoolex.Private.IdleWorkers.count/1(changed fromneg_integer()tonon_neg_integer()). - Made
Poolex.Private.Monitoring.remove/2safer by not pattern matching on theProcess.demonitor/1return value.
[1.4.1] Small fixes
What's Changed
Fixed
- Fixed overflow worker expiration timing to use
System.monotonic_time/1instead ofTime.utc_now/0. This prevents incorrect worker expiration when system clock changes occur (e.g., from NTP adjustments or timezone changes). - Fixed one of the flaky tests.
Full Changelog: v1.4.0...v1.4.1
[1.4.0] Worker shutdown delay support
What's Changed
Added
- New option
worker_shutdown_delayfor delayed shutdown of overflow workers. Allows to specify a delay (in ms) before terminating overflow workers after they are released. See the new guide for details. - New option
idle_overflowed_workers_implfor customizing the implementation of idle overflowed workers storage. - Strong runtime pool init options validation.
Changed
Breaking changes
- Function
get_debug_info/1moved fromPoolextoPoolex.Private.DebugInfo(according to the issue). - Function
Poolex.get_state/1was removed. - Minimum required version of Elixir bumped to
~> 1.17and Erlang/OTP to~> 25.
Full Changelog: v1.3.0...v1.4.0
[1.3.0] Handle errors on a worker's start
What's Changed
Added
-
Added caching of the dependencies on CI (compilation speed up).
-
Added a new option
failed_workers_retry_intervalto the pool configuration. This option configures the millisecond interval between retry attempts for workers that failed to start. The value is1 secondby default. Example:Poolex.start_link( worker_module: SomeUnstableWorker, workers_count: 5, failed_workers_retry_interval: 3_000 )
Changed
- Due to the deprecation of support for Ubuntu 20.04 on GitHub Actions (read more here), bumped minimum required versions of Elixir to
~> 1.11and Erlang/OTP to~> 24.
Fixed
- Fixed the
MatchErroron pool starting error that occurs with errors on the launch of workers (read more in issue).
Full Changelog: v1.2.1...v1.3.0
[1.2.1] Patch with some fixes
What's Changed
Fixed
- Now the
busy_workerwill be restarted after thecaller'sdeath. Read more in issue. - The function
add_idle_workers!/2now provides new workers to waiting callers if they exist. Read more in issue.
Full Changelog: v1.2.0...v1.2.1
[1.2.0] `pool_id` fallbacks to `worker_module`
What's Changed
Added
- Added Elixir 1.18.* support to CI.
Changed
- Refactored tests with new ExUnit parameterize feature.
:pool_idis not required init option anymore. For now it is equal toworker_moduleoption value.
Fixed
- Functions
Poolex.add_idle_workers!/2andPoolex.remove_idle_workers!/2now accept any value of typeGenServer.name()as their first argument, instead of onlyatom(). - Supressed Supervisor's error logs in tests.
Full Changelog: v1.1.0...v1.2.0
[1.1.0] Optimized monitoring and other improvements
What's Changed
Added
- Added adobe/elixir-styler to project.
Changed
- Monitoring implementation has been optimized by using a plain map instead of the
Agentprocess. - Refactored State struct by adding a list of @enforced_keys. (Details)
- Poolex processes now have higher priority. (Details)
Deprecated
Poolex.get_state/1deprecated in favor of:sys.get_state/1.
New Contributors
Full Changelog: v1.0.0...v1.1.0
[1.0.0] Support any `GenServer.name()` as `pool_id`
What's changed
Changed
- Monitoring implementation now uses
Agentinstead of:ets. It's needed to be more flexible in pool naming. - The
pool_idcan now be any validGenServer.name(). For example,{:global, :biba}or{:via, Registry, {MyRegistry, "boba"}}.
[0.10.0] Change pool size in runtime
What's changed
Added
- Added functions
add_idle_workers!/2andremove_idle_workers!/2for changing the count of idle workers in runtime.
Changed
- Refactored private
start_workersfunction. It no longer accepts monitor_id as it already is in the state. - Updated
telemetrydependency.
[0.9.0] Pool size metrics
What's Changed
Pool size metrics (using telemetry) were added. How to use them is described here: Working with metrics guide.
To enable pool size metrics, you need to set the pool_size_metrics parameter to true on the pool initialization:
children = [
{Poolex,
pool_id: :worker_pool,
worker_module: SomeWorker,
workers_count: 5,
pool_size_metrics: true}
]