A publish goes to the LAN and the mesh, deduplicated at the bridge #12
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Purpose (capability): a fact a LAN member publishes reaches the mesh as well as the LAN, so other realms keep hearing the cluster whoever subscribes on the LAN, and each subscriber hears it once.
The gap
mcl_core_transport:publish/3sends to the LAN's subscribers and goes to the bridge only when the LAN has none ({error, no_lan_subscriber}). A topic with one LAN subscriber is then never published on the mesh: a service in another realm, or mcl-graph's mesh learner, stops hearing the cluster's facts the day a cluster node subscribes. DECIDED 2026-12-02 (Raf): "we won't loose the mesh! I just don't want to pitch Martha as "mesh-only"": the LAN sits beside the mesh, never in place of it.What
okwhen the LAN took the fact and the mesh answersmesh_unavailable(a cluster with no mesh keeps publishing on its LAN).group) runs behindmcl_core_cluster_echo, which drops a mesh event whosepublisheris a node of this cluster (mcl_core_lan:cluster_node/1). Sealed-group subscriptions stay mesh-only and hear the cluster there. A standalone node is unchanged. No wire change.Threat model
publisheris a claim. An outsider naming a cluster node's id has its event dropped at the bridge, which loses that outsider's own event and nothing else. No event is accepted that was not before.Done when
mesh_unavailable→ok; any other mesh error is the answer (eunit).Refs macula-services/mcl-graph#19, macula-services/mcl-core#10
Amendment to the Done-when, as built in PR 14 (
391fe14, Mercurius PASS): the line "any other mesh error is the answer" now excludes a member's{error, {bridge_unreachable, _}}as well as{error, mesh_unavailable}. When the LAN took the fact, both answerok.Why: a member cut off from its bridge is a node with no mesh, just like
mesh_unavailable. mcl_core 1.0 answeredokthere, because the LAN took the fact and nothing went to the bridge. If the caller retried on the error, it would deliver to the LAN twice. Any other mesh error is still the answer. Pinned bya_lan_publish_with_no_bridge_reached_is_okintest/mcl_core_transport_tests.erl; a mutant that drops the clause fails it.