In-process hot upgrades from local mix release tarballs.
This path reloads code inside the currently running node instead of starting a replacement peer. It is intended for compatible code changes only.
Hot upgrades are appropriate when:
- processes can survive
code_change/3 - the supervision tree shape is unchanged
- the running node and tarball use the same Erlang/OTP version
Hot upgrades are not supported for:
- supervision tree topology changes
- Erlang/OTP upgrades
- NIF upgrades
- major runtime config topology changes
Summary
Functions
Applies a hot upgrade from a local release tarball.
Types
@type upgrade_stats() :: %{ copied_modules: non_neg_integer(), copied_new_modules: non_neg_integer(), copied_consolidated_protocols: non_neg_integer(), module_names: [String.t()], modules_reloaded: non_neg_integer(), process_failures: [map()], process_names: [String.t()], processes_failed: non_neg_integer(), processes_skipped: non_neg_integer(), processes_succeeded: non_neg_integer(), skipped_nif_modules: [module()], suspend_duration_ms: non_neg_integer() }
Functions
@spec hot_upgrade(Path.t(), atom(), keyword()) :: {:ok, upgrade_stats()} | {:error, term()}
Applies a hot upgrade from a local release tarball.
Options
:suspend_timeout- timeout in milliseconds for suspending each process before code change, defaults to3000