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

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

Open
slfritchie opened this issue Aug 3, 2015 · 2 comments
Open

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

slfritchie opened this issue Aug 3, 2015 · 2 comments

Comments

@slfritchie
Copy link
Contributor

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.

@tsantero
Copy link
Contributor

tsantero commented Aug 8, 2015

Was on vacation past few days. Looking into this tonight. Thanks for opening the issue!

@benoitc
Copy link

benoitc commented Mar 31, 2016

what's the status of this issue?

dergraf added a commit to dergraf/plumtree that referenced this issue Oct 26, 2018
Handle the case where the plumtree_metadata_object:values/1 returns an empty list
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants