Conversation
|
Just wanted to confirm my understanding why it is necessary to include the handling of an info message When the exchange is initiated it is passed an AAE send fun (to be used by remote processes to reply to the exchange), within Riak this is generated from: https://github.com/OpenRiak/riak_kv/blob/openriak-3.4/src/riak_kv_vnode.erl#L619-632 When this is called by the exchange, it creates the sender to be used for response messages as {fsm, undefined, self()}. So the exchange is identified as an FSM (not a STATEM) within Riak. When the vnode processes an AAE message (e.g. a request to fetch_root), it will response with riak_core_vnode:reply/2 : https://github.com/OpenRiak/riak_core/blob/openriak-3.4/src/riak_core_vnode.erl#L1134-L1135 This will use https://github.com/OpenRiak/riak_core/blob/openriak-3.4/src/riak_core_send_msg.erl#L50-L56. So when used in Riak the responses that are expected in the Is that the correct understanding? Although this is a bit hacky ... riak_core doesn't have message handling for gen_statem at present; and also during transition an exchange could be either a Does this seem reasonable? |
This reverts commit 4af1c34.
Two instances of gen_fsm (aae_keystore and aae_exchange) have been converted to gen_statem.