mesh_watch over both paths returns a LAN member's fact twice: its mesh copy carries the bridge's publisher id #16
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 (fix):
mesh_watchwithMACULA_LAN_ENTRYset returns a fact a LAN member published once, not twice, when it hears the fact on both the LAN and the mesh.Refs macula-io/macula-mcp#11, macula-services/mcl-core#12 (mcl-core 1.1.0, PR 14). Found reviewing mcl-core 1.1.0 against Neptunus's payload-form question.
The gap
FirstCopy.keep(src/reach_the_lan/hear_both.ts) matches the two copies onpublisher + topic + sha256(canonicalJson(payload)). In mcl-core 1.1.0, the two paths do not agree on two of these:publisher => the member's own node id(mcl_core_lan:publish/3), and to the mesh by erpc to the bridge, which runsmcl_core_pubsub:mesh_publish/3on its own pool (mcl_core_bridge:publish/3). The mesh copy'spublisheris therefore the BRIDGE's node id. Every fact a member publishes never matches its other copy, so it is returned twice. Only a fact the bridge itself publishes carries the same publisher on both paths.mcl_core_lan_json:value/1). On the mesh, macula's CBOR keeps abinary()as a byte string (macula_record_cbormoduledoc), which this server'sbytes: "tagged"subscription returns as{"$bytes": ...}. If so, any payload holding a string value hashes differently on the two paths, even from the bridge.Both fail open: the agent sees the fact twice. Nothing is lost.
Done when
publisher, or map a cluster member to its bridge (the second needs a ruling first).