You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
process spawned by rex when handling a request from leo_gateway (online task)
process spawned as a gen_server (leo_mq_consumer) when consuming an item stored in leo_mq (offline task)
Problem
No problem when handling online tasks.
The problem can happen when handling offline tasks because a caller process is a gen_server so calling erlang:receive can receive messages unintentionally generated by gen_server:call/cast.
Solution
We are going to add a tag (in order to receive messages ONLY we are using in leo_storage_replicator) into all messages.
Background
Problem
No problem when handling online tasks.
The problem can happen when handling offline tasks because a caller process is a gen_server so calling erlang:receive can receive messages unintentionally generated by gen_server:call/cast.
Solution
We are going to add a tag (in order to receive messages ONLY we are using in leo_storage_replicator) into all messages.
Reference
How the gen_server manages send/receive messages.
The text was updated successfully, but these errors were encountered: