Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

resetNodes() should respect gossip to dead #106

Merged
merged 4 commits into from
Feb 8, 2017

Conversation

bosconi
Copy link
Contributor

@bosconi bosconi commented Jan 28, 2017

#99 introduced Config.GossipToTheDeadTime.

resetNodes() is called when a node gets to the end of its randomized list of nodes to gossip with. It should not remove dead nodes if they entered the dead state less than Config.GossipToTheDeadTime ago.

Copy link
Contributor

@slackpad slackpad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One small change, then this looks good to merge!

state_test.go Outdated
@@ -862,13 +862,26 @@ func TestMemberList_ResetNodes(t *testing.T) {
d := dead{Node: "test2", Incarnation: 1}
m.deadNode(&d)

oldGossipToTheDeadTime := m.config.GossipToTheDeadTime
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to save and restore this - the scope here is just this one test.

state_test.go Outdated
@@ -862,13 +862,26 @@ func TestMemberList_ResetNodes(t *testing.T) {
d := dead{Node: "test2", Incarnation: 1}
m.deadNode(&d)

oldGossipToTheDeadTime := m.config.GossipToTheDeadTime
m.config.GossipToTheDeadTime = 3 * time.Second
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's set this to something like 200 * time.Millisecond so the test doesn't take too long.

@bosconi
Copy link
Contributor Author

bosconi commented Feb 8, 2017

Makes sense. Done.

Copy link
Contributor

@slackpad slackpad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One more one liner!

state_test.go Outdated
t.Fatalf("test2 should not be unmapped")
}

time.Sleep(5 * time.Second)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can knock this one down, too.

@slackpad slackpad merged commit 23ad4b7 into master Feb 8, 2017
@slackpad slackpad deleted the b-resetnodes-respect-gossip-to-dead branch February 8, 2017 21:15
Dieterbe added a commit to grafana/metrictank that referenced this pull request Nov 26, 2017
pre v0.1.0 interesting changes:
* a bugfix for GossipToTheDeadTime
  (hashicorp/memberlist#106)

post v0.1.0 interesting changes:
* Reduce LAN min suspicion multiplier
  (hashicorp/memberlist#129)
Dieterbe added a commit to grafana/metrictank that referenced this pull request Nov 26, 2017
pre v0.1.0 interesting changes:
* a bugfix for GossipToTheDeadTime
  (hashicorp/memberlist#106)

post v0.1.0 interesting changes:
* Reduce LAN min suspicion multiplier
  (hashicorp/memberlist#129)
Dieterbe added a commit to grafana/metrictank that referenced this pull request Dec 1, 2017
pre v0.1.0 interesting changes:
* a bugfix for GossipToTheDeadTime
  (hashicorp/memberlist#106)

post v0.1.0 interesting changes:
* Reduce LAN min suspicion multiplier
  (hashicorp/memberlist#129)
Aergonus pushed a commit to bloomberg/metrictank that referenced this pull request Jan 19, 2018
pre v0.1.0 interesting changes:
* a bugfix for GossipToTheDeadTime
  (hashicorp/memberlist#106)

post v0.1.0 interesting changes:
* Reduce LAN min suspicion multiplier
  (hashicorp/memberlist#129)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants