v0.5.0-beta - 2026-02-17
This release adds per-child metadata support, an experimental autonomous migration strategy, and major performance optimizations for large-scale operations.
It also includes a complete hook system overhaul with consistent naming and map-based data formats, a reimplemented HotSwap migration matching ColdSwap's pattern, and removal of the event queue locking mechanism.
Several race conditions and registry consistency bugs have been fixed, along with batched nodedown handling for rapid scale-down scenarios.
Added
- Per-child metadata via
:child_metadataoption instart_children/3— accepts%{child_id => metadata_map}, overrides global:metadataper child. deterministic?/1protocol function inDistribution.Base— indicates whether a strategy produces deterministic results based on topology alone (used to optimize child validation).topology_signature/1inCluster— computes a hash of cluster topology for change detection.- Auto-calculated GenServer.call timeout for
start_children/3andstop_children/3:5000ms + (1ms × child_count). Override with:call_timeoutoption. :handover_delivered_hook— fires after HotSwap/ColdSwap migration completes state delivery.ProcessHub.Strategy.Migration.Autonomous— experimental strategy where nodes independently reconcile local state against the distribution ring with no inter-node communication.
Performance
- Batched
belongs_to()calls inReplication.handle_post_start/3— O(n) individual lookups reduced to a single batch operation. - Topology signature optimization skips redundant
belongs_to()revalidation when topology hasn't changed. Applies to deterministic strategies only (ConsistentHashing, Guided). belongs_to/4now returns a Map instead of tuple list — O(1) lookups during redistribution.- Migration, redundancy, and cluster update handlers use Map-based child-to-node resolution.
Breaking changes
- Removed event queue locking:
lock_event_handler/2,unlock_event_handler/1,PriorityLevel,priority_state_updatedhook,deadlock_recovery_timeoutoption. UseProcessHub.is_partitioned?/1for partition state.is_locked?/1reimplemented as counter-based pending worker queue tracker. - Startup validation rejects handover (ColdSwap/HotSwap
:handover) combined with Replication redundancy. Returns{:error, {:invalid_config, :handover_with_replication_not_supported}}. belongs_to/4must return%{child_id => [node()]}Map instead of[{child_id, [node()]}]list.- HotSwap migration reimplemented to match ColdSwap's pattern:
- Removed:
:retention,:confirm_handover,:handover_data_wait,:child_migration_timeout - Added:
:state_ttl(30s default),:state_query_timeout(5s default) - ETS-based state storage; old process terminated immediately after delivery
- New
hotswap_handover_deliveredhook
- Removed:
- Renamed
:children_migrated_hook→:migration_handled_hook(signals handler completion, not full migration). - Hook system overhaul: All hook data dispatched as maps. Renames:
pre/post_cluster_join/leave_hook→pre/post_node_join/leave_hook,registry_pid_insert/remove_hook→child_registered/unregistered_hook,migration_handled_hook→migration_completed_hook,forwarded_migration_hook→children_forwarded_hook,pre/post_nodes_redistribution_hook→pre/post_redistribution_hook,child_process_pid_update_hook→child_pid_updated_hook. Removed:process_startups_hook(consolidated intopost_children_start_hook). Added:scoreboard_updated_hook.
Fixed
- HotSwap race condition:
bulk_deleteerased registry entries before gossipPidsRegisterRequestarrived. Entries now retained as TTL tombstones; gossip node-join sync callsdetach_datafor stale entries. - Replication
start_replica_locallyoverwrote existing node-pid entries viainsertinstead of merging. Restructured into classify-then-execute pattern usingbulk_insert. - Process registry writes now synchronous — all write/delete operations routed through GenServer to prevent concurrent interleaving.
- Interval sync skips redundant registry updates when local PID already matches remote.
- Batched nodedown handling for rapid node scale-down — multiple failures processed together via
NodeDownBatch. Configurable window::nodedown_batch_window_ms(default: 500ms). - Replaced OTP supervisor state introspection (
elem/2on internal record) with start-MFA proxy using process dictionary cache for OTP forward-compatibility.