Skip to content
This repository was archived by the owner on Apr 4, 2022. It is now read-only.
This repository was archived by the owner on Apr 4, 2022. It is now read-only.

Three node cluster doesn't have all peers set correctly? #20

@slfritchie

Description

@slfritchie

Hi. I was fiddling with a 3 node cluster and saw some odd behavior on commit 097fcb2.

  • For all nodes, rm -rf ./data, just in case.
  • For all nodes, start Erlang with short node names p0@sbb4, p1@sbb4, and p2@sbb4. (Your hostname will vary, of course.) E.g. erl -sname p0 -pz ebin _build/*/*/*/ebin
  • For all nodes, run plumtree:start().
  • On node p0, run: [{goo, X} ! hello || X <- [p1@sbb4, p2@sbb4] ].
  • On node p0, run, [plumtree_peer_service:join(X) || X <- nodes()].

Then, if I run the following:

f(All).
All = lists:sort([node()|nodes()]).
[{X, Y, catch plumtree_broadcast:debug_get_peers(X, Y)} || X <- All, Y <- All].

I see the following oddity on node p0:

[{p0@sbb4,p0@sbb4,{[],[]}},
{p0@sbb4,p1@sbb4,{[],[]}},
{p0@sbb4,p2@sbb4,{[],[]}},
{p1@sbb4,p0@sbb4,{[p2@sbb4],[p0@sbb4]}},
{p1@sbb4,p1@sbb4,{[p2@sbb4],[p0@sbb4]}},
{p1@sbb4,p2@sbb4,{[p2@sbb4],[p0@sbb4]}},
{p2@sbb4,p0@sbb4,{[p0@sbb4],[p1@sbb4]}},
{p2@sbb4,p1@sbb4,{[p0@sbb4],[p1@sbb4]}},
{p2@sbb4,p2@sbb4,{[p0@sbb4],[p1@sbb4]}}]

... which means that replication of any metadata put() on node p0 is needlessly (?) delayed by 10s of seconds before appearing on p1 and p2.

If I stop & start the VM of node p0 and restart Plumtree, the peer sets are non-empty as expected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions