Packages
A tiny library for lookup node(s) in dynamic clustering. Map node to roles or id and allows you to easily select node(s) by role/id.
Current section
Files
Jump to
Current section
Files
cluster_helper
CHANGELOG.md
CHANGELOG.md
# Changelog
All notable changes to this project are documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [1.2.0]
### Added
- `ClusterHelper.print_nodes/0-1` — debug helper for IEx that prints every
node in a scope together with its roles (`:"node1@host" → [:web, :api]`).
When called without a scope, prints all scopes the local node participates
in; empty scopes are shown as `(no nodes)`.
- `ClusterHelper.print_all/0` — prints every joined scope with all of its
nodes and each node's roles.
## [1.1.0]
### Fixed
- `:pull_timeout` config is now honoured by the default ERPC remote-sync
adapter (previously documented but silently ignored).
- Event-handler callbacks (`on_role_added/2`, `on_role_removed/2`,
`on_node_added/1`, `on_node_removed/1`) are crash-guarded: an exception or
exit inside a user handler is logged and swallowed instead of taking down
the `ClusterHelper.NodeConfig` GenServer.
- Telemetry events `[:cluster_helper, :sync, :pull]` and
`[:cluster_helper, :gen, :check]` are now actually emitted during pulls.
### Changed
- **ETS layout (v2)** — `ClusterHelper.NodeConfig` is now an `:ordered_set`
with one unique composite key per fact, replacing the previous `:bag` +
`:compressed` layout. Bulk operations that previously scaled quadratically
are now linear: adding 5,000 roles dropped from ~4s to ~120ms and removing
2,500 roles from ~3.3s to ~5ms. Table *names* are unchanged; code that read
raw tuples from the table must be updated to the new row shape.
- Periodic generation checks RPC to nodes concurrently (up to 16 at a time)
instead of sequentially, keeping pull cycles fast on large clusters.
- Internal pull messages always carry a generation field (`nil` when unknown).
- `ClusterHelper.RoleStore` gains an optional `delete_roles/3` callback used
for efficient batch removal; adapters that do not implement it keep working
via a per-role fallback.
## [1.0.1] - 2025
### Fixed
- Docs link cleanup.
## [1.0.0]
### Changed
- Re-designed around pluggable adapters (`broadcast`, `role_store`,
`remote_sync`) resolved via `ClusterHelper.Adapter`.
- Overlapping scope support with per-scope isolation, dynamic
`join_scope/leave_scope`, and generation-based sync.
[Unreleased]: https://github.com/ohhi-vn/cluster_helper/compare/v1.0.1...HEAD
[1.0.1]: https://github.com/ohhi-vn/cluster_helper/compare/v1.0.0...v1.0.1
[1.0.0]: https://github.com/ohhi-vn/cluster_helper/tag/v1.0.0