5.6.1-to-5.6.1+patch.A.relup 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. %% This file contains instructions for upgrading from the LAST version to
  2. %% the CURRENT version.
  3. %%
  4. %% We only need to write instructions for the changes in the specific pull request,
  5. %% these files will be automatically merged/aggregated into a complete relup file
  6. %% before a new version is released.
  7. %%
  8. %% Note that we do not support the 'apply' command in the 'code_changes' section.
  9. %% If any complex operations are needed during the upgrade process, please add
  10. %% them in the 'post_upgrade_callbacks' section, and implement them in the
  11. %% 'emqx_post_upgrade' module. We consolidate the hot upgrade callback code into
  12. %% a single module ('emqx_post_upgrade') is to avoid mixing the hot upgrade-related
  13. %% code with the main logic code.
  14. ChildSpec = fun(Mod) ->
  15. #{
  16. id => Mod,
  17. start => {Mod, start_link, []},
  18. restart => permanent,
  19. shutdown => 5000,
  20. type => worker,
  21. modules => [Mod]
  22. }
  23. end.
  24. #{
  25. target_version => "5.6.1+patch.A",
  26. from_version => "5.6.1",
  27. code_changes =>
  28. %% the 'emqx_release' and 'emqx_post_upgrade' will be automatically added,
  29. %% no need to include them here
  30. [ {load_module, emqx_broker}
  31. , {load_module, emqx_metrics}
  32. , {load_module, emqx_ds_replication_shard_allocator}
  33. , {update, emqx_ds_replication_layer_egress, {advanced, #{}}}
  34. ],
  35. post_upgrade_callbacks =>
  36. [
  37. %% emqx_post_upgrade:pr12765_update_stats_timer/1
  38. pr12765_update_stats_timer,
  39. %% emqx_post_upgrade:pr20000_ensure_sup_started/3
  40. {pr20000_ensure_sup_started, ["5.6.1+patch.A", ChildSpec(some_mod)]}
  41. ]
  42. }.