View Source CHANGELOG
v5.0.0-beta.20
  
  bug-fixes
  
  Bug Fixes
- Continued adding support for OTP.
- The OTP modules 
sys,proc_libwhere patched (partisan_sys,partisan_proc_lib) so that they support thepartisan_remote_ref:t()type and use thepartisanmodule functions for finding, monitoring and sending messages instead of the native Erlang counterparts. - OTP patched files are located in the priv directory and loaded dynamically by 
rebar.config.scriptbased on the Erlang/OTP version being used. - Patched the CT suites (
gen_server_SUITE,gen_statem_SUITE,gen_event_SUITE) to test the partisan OTP modules. All tests passing except for some test cases that require not-yet implemented features like global and somerpcfunctions. - Notice 
globalis not yet supported by Partisan. 
 - The OTP modules 
 
  
  additions
  
  Additions
- New improper list format for 
partisan_remote_ref. This deprecates the config optionremote_ref_as_uriand addsremote_ref_formatinstead which acceptsimproper_list(the new default),tuple(the legacy format) anduri(also introduced in v5). - Addes 
partisan_erpc. The patched version of the Erlang'serpcmodule. 
v5.0.0-beta.19
  
  bug-fixes-1
  
  Bug Fixes
- Fix implementation of 
partisan_pluggable_peer_service_manager:sync_join/1. 
v5.0.0-beta.18
  
  bug-fixes-2
  
  Bug Fixes
- Remove optimisation from 
partisan:self/0and addpartisan:self/1which accepts thecacheoption making the use of th optimization to be explicit. Check the docs for the explanation. - Fixed bug in 
partisan:monitor/2introduced in previous version. 
v5.0.0-beta.17
  
  bug-fixes-3
  
  Bug Fixes
- Fix bugs in 
partisan_gen_statemandpartisan_gen 
v5.0.0-beta.16
  
  bug-fixes-4
  
  Bug Fixes
- Fix a bug in 
partisan:send/2,3 
  
  changes
  
  Changes
- Ensure the membership channel (
partisan_membership) exits and is properly configured. 
v5.0.0-beta.15
  
  bug-fixes-5
  
  Bug Fixes
- General bug fixes including:
- #121 updated_members should only accept a list of maps (an never a list of nodes)
 - fix wrong calls to 
self()andnode()as opposed to their partisan counterparts 
 - Fixed bugs in 
partisan_monitor - Several bug fixes in the OTP implementation
 - Several bug fixes in the CT suite
 
  
  changes-1
  
  Changes
- Changed signature of partisan_membership_strategy and the implementing modules; added API e.g.  
join(state(), partisan:node_spec(), state())is nowjoin(partisan:node_spec(), state(), state())which is more natural. - Added partisan_membership_strategy API functions, so that pluggable manager can call these functions
 - Some other naming changes to disambiguate e.g. membership -> members
 - moved some opt types from partisan_monitor to partisan module
 - Fixed mising of gen_ and partisan_gen function calls.
 - Made 
channeloptions to be respected across the stack- Added channel configuration to 
partisan_monitorcalls. - Added channel to OTP behaviours.
- The messages and the monitor signals will be sent using the configured channel.
 - overloaded gen_server/statem functions to accept options including channel so that we do not add another function to the API
 - store the Partisan opts in the process dict (again to avoid modifying our changed versions of the behaviours) *
 
 
 - Added channel configuration to 
 - Configuration parameters renaming. Several configuration parameters were renamed. Check 
partisan_configmodule description. The old parameters are still accepted but are renamed during startup. - Deprecated the 
partisan_peer_service_manager:myselfcallback - Fix 
partisan_utilterm encoding and renamed function; added compression option for encoding and for memberhip payload 
  
  additions-1
  
  Additions
- Added the following modules:
partisan_supervisorbehaviour
 - Added the following functions:
 - Peer Service manager now allows subscribing to events per channel
partisan_peer_service_manager:on_up/3accepting a channelpartisan_peer_service_manager:on_down/3accepting a channel
 
v5.0.0-beta.14
  
  api
  
  API
Changes
- Several functions previously found in 
partisan_utilare now inpartisan_peer_service_manager. 
- Types previously found in 
partisan.hrlare now defined and exported by thepartisanmodule. 
  
  peer-membership
  
  Peer Membership
Fixes
- Several bug fixes in the following backends:
partisan_hyparview_peer_service_managerpartisan_xbot_hyparview_peer_service_managerpartisan_client_server_peer_service_manager
 - Fixes a bug in 
partisan_plumbtree_broadcastwhere not all the handlers were used.- The configuration option 
broadcast_start_exchange_limitis now considered to refer to each handler i.e. a limit of1means Partisan will only allow one instance of a broadcast AAE exchange per handler (and not a single one in total). 
 - The configuration option 
 
  
  peer-connection-management
  
  Peer Connection Management
Changes
- Channel parallelism can now be defined per channel
channelsconfiguration option is overloaded to allow the new configuration options while keeping backwards compatibility. Check the documentation for the new formats in partisan_config.- The 
partisan:node_spec/0representation was changed:parallelismwas removedchannelswas changed from a list of atoms or tuples to a the return ofpartisan_config:get(channels)i.e. a map.
 parallelismis now used as a default when the user doesn’t define a per channel parallelism.- The 
partisanmodule now exports the new functionchannel_opts/1with returns the options for a given channel. 
 
v5.0.0-beta.13
  
  api-1
  
  API
In general, the API was redesigned to concentrate all functions around two modules: partisan and partisan_peer_service.
Changes
partisanmodule was repurposed as a replacement for theerlangmodule for use cases related to distribution e.g.erlang:nodes/0->partisan:nodes/0.- Several functions previously found in 
partisan_peer_service,partisan_monitorandpartisan_utilare now in this module:partisan:broadcast/2partisan:cast_message/2partisan:cast_message/3partisan:cast_message/4partisan:default_channel/0partisan:demonitor/1partisan:demonitor/2partisan:disconnect_node/1.partisan:forward_message/2partisan:forward_message/3partisan:forward_message/4partisan:is_alive/0partisan:is_connected/1partisan:is_connected/2partisan:is_fully_connected/1partisan:is_local/1partisan:is_pid/1partisan:is_process_alive/1partisan:is_reference/1partisan:make_ref/0partisan:monitor/1partisan:monitor/2partisan:monitor/3partisan:monitor_node/2partisan:monitor_nodes/1partisan:monitor_nodes/2partisan:node/0partisan:node/1partisan:node_spec/0partisan:node_spec/1partisan:node_spec/2partisan:nodes/0partisan:nodes/1partisan:nodestring/0partisan:self/0
 
- Several functions previously found in 
 Added the following functions:
partisan_peer_service:broadcast_members/0partisan_peer_service:broadcast_members/1partisan_peer_service:cancel_exchanges/1partisan_peer_service:exchanges/0partisan_peer_service:exchanges/1partisan_peer_service:get_local_state/0partisan_peer_service:inject_partition/2partisan_peer_service:leave/1partisan_peer_service:member/1partisan_peer_service:members_for_orchestration/0partisan_peer_service:on_down/2partisan_peer_service:on_up/2partisan_peer_service:partitions/0partisan_peer_service:reserve/1partisan_peer_service:resolve_partition/1partisan_peer_service:update_members/1
Use of
partisan_peer_service:mynode/0has been replaced bypartisan:node/0to follow Erlang conventionUse of
partisan_peer_service:myself/0has been replaced bypartisan:node_spec/0to disambiguate frompartisan:node/0.Use of
Nodevariable name fornode()type (as opposed toName) andNodeSpecfornode_spec()(as opposed toNode) to disambiguate.Adde new module
partisan_rpcthat will provide and API that mirrors ErlangsrpcanderpcmodulesAdded
partisan_remote_refto encapsulate the creation of reference and added an optional/alternative representation for encoded pids, references and registered names. The module offers all the functions to convert pids, references and names to/from Partisan encoded references.Alternative representation: In cases where lots of references are stored in process state, ets and specially where those are uses as keys, a binary format is preferable to the tuple format in order to save memory usage and avoid copying the term every time a message is send between processes.
partisan_remote_refrepresents an encoded reference as binary URI. This is controlled by the config optionremote_ref_as_uriandremote_ref_binary_paddingin case the resulting URIs are smaller than 65 bytes.1> partisan_remote_ref:from_term(self()). {partisan_remote_reference,nonode@nohost,{partisan_process_reference,"<0.1062.0>"}} 2> partisan_config:set(remote_ref_as_uri, true). ok 3> partisan_remote_ref:from_term(self()). <<"partisan:pid:nonode@nohost:0.1062.0">> 4> partisan_config:set(remote_ref_binary_padding, true). ok 5> partisan_remote_ref:from_term(self()). <<"partisan:pid:nonode@nohost:0.1062.0:"...>>
  
  peer-membership-1
  
  Peer Membership
Fixes
- Extracted the use of 
state_orsetfrompartisan_full_membership_strategyinto its own modulepartisan_membership_setwhich will allow the possibility to explore alternative data structures to manage the membership set. - Introduced a membership prune operation to remove duplicate node specifications in the underlying 
state_orsetdata structure. This isto avoid an issue where a node will crash and restart with a different IP address e.g. when deploying in cloud orchestration platforms. As the membership set containsnode_spec()objects which contain IP addresses we ended up with duplicate entries for the node. The prune operation tries to break ties between these duplicates at time of connection, trying to recognise when a node specification might be no longer valid forcing the removal of the spec from the set. - Fixes several bugs related to the 
leaveoperation inpartisan_pluggable_peer_service_manager:- Added a missing call to update the membership set during leave
 - Fixed a concurrency issue whereby on self leave the peer service server will restart before being able to sending the new state with the cluster peers and thus the node would remain as a member in all other nodes.
 
 - Resolves an issue 
partisan_plumtree_broadcastwhere theall_membersset was not updated when a member is removed. - Resolves the issue where the 
partisan_plumtree_broadcastwas not removing the local node from the broadcast member set. - Gen Behaviours take new option 
channelif defined. - Fixed implementation of 
on_upandon_downcallback functions inpartisan_pluggable_peer_service_manager 
Changes
- Added function 
partisan_peer_service_manager:member/1 - Replaced the use of in-process sets in 
plumtree_broadcast_backendwith anetstable for outstanding messages keeping the gen_server stack lean and avoiding garbage collection 
  
  peer-connection-management-1
  
  Peer Connection management
Fixes
- Fixes a bug where connections where not properly killed during a leave
 - Split TLS options for client and server roles
- Removed 
tls_options - Added 
tls_client_optionsandtls_server_options 
 - Removed 
 
Changes
- New module 
peer_service_connections:- Replaces the former 
peer_service_connectionsprocess state data structure and thepartisan_connection_cachemodule. - As a result, the 
partisan_connection_cachemodule has been was removed. - Checking connection status is now very fast and cheap. The implementation uses 
etsto handle concurreny. It leverages leveragesets:update_counter/4,ets:lookup_element/3andets:select_count/2for fast access and to minimise copying data into the caller's process heap. 
 - Replaces the former 
 
  
  process-and-peer-monitoring
  
  Process and Peer Monitoring
Fixes
- A more complete/safe implementation of process monitoring in 
partisan_monitor. - More robust implementation of monitors using the new subscription capabilities provided by 
peer_service:on_upandpeer_service:on_downcallback functions.- monitor a node or all nodes
 - use node monitors to signal a process monitor when the remote node is disconnected
 - local cache of process monitor to ensure the delivery of DOWN signal when the connection to the process node is down.
 - avoid leaking monitors
 - new supervisor to ensure that 
partisan_monitoris restarted every time the configuredpartisan_peer_service_manageris restarted. - re-implementation based on ets tables
 - If using OTP25 the monitor gen_server uses the parallel signal optimisation by placing the process inbox data off heap
 
 
NOTICE
At the moment this only works for
partisan_pluggable_peer_service_managerbackend.
Changes
- New api in 
partisanmodule following the same name, signature and semantics of theirerlangandnet_kernelmodules counterparts: 
  
  otp-compatibility
  
  OTP compatibility
Fixes
Changes
- Partisan now requires OTP24 or later.
 - Upgraded 
partisan_genandpartisan_gen_serverto match their OTP24 counterparts implementation - Added 
partisan_gen_statem partisan_gen_fsmdeprecated as it was not complete and focus was given to the implementation ofpartisan_gen_stateminstead- Module 
partisan_mochiglobalhas been removed and replaced bypersistent_term 
  
  misc
  
  Misc
Fixes
- Most existing 
INFOlevel logs have been reclassified asDEBUG - Fixed types specifications in various modules
 
Changes
lagerdependency has been removed and all logging is done using the new Erlanglogger- Most uses of the 
orddictmodule have been replaced by maps for extra performance and better usability - Most API options using 
proplistsmodule have been replaced by maps for extra performance and better usability - In several functions the computation of options (merging user provided with defaults, validation, etc.) has been postponed until (and only if) it is needed for extra performance e.g. 
partisan_pluggable_peer_servie_manager:forward_message - More utils in 
partisan_util - Added 
ex_doc(Elixir documentation) rebar plugin - Upgraded the following dependencies:
uuidtypes- rebar plugins