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

Start cluster before broker. #2293

Merged
merged 3 commits into from
Apr 15, 2015
Merged

Start cluster before broker. #2293

merged 3 commits into from
Apr 15, 2015

Conversation

benbjohnson
Copy link
Contributor

Overview

This commit fixes an issue where the second node joins but the first node cannot commit because it doesn't have the HTTP endpoint running yet. This is a side effect of streaming raft since we don't synchronize the quorum set with the heartbeats. We should cache the config per term in the future.

This commit fixes an issue where the second node joins but the first node
cannot commit because it doesn't have the HTTP endpoint running yet. This
is a side effect of streaming raft since we don't synchronize the quorum
set with the heartbeats. We should cache the config per term in the future.
@otoolep
Copy link
Contributor

otoolep commented Apr 15, 2015

Test failed due to these issues:

Transport.ReadFrom: error: not leader
[raft] 2015/04/15 17:23:18 readFromLeader: read from: //log0, id=2, term=1, index=98
[raft] 2015/04/15 17:23:18 ReadFrom
[raft] 2015/04/15 17:23:18 reading from stream
[raft] 2015/04/15 17:23:18 unable to init writer: not leader
Transport.ReadFrom: error: not leader
==================
WARNING: DATA RACE
Read by goroutine 22:
  github.com/influxdb/influxdb/raft.(*IndexFSM).Index()
      /home/ubuntu/.go_project/src/github.com/influxdb/influxdb/raft/internal_test.go:57 +0x36
  github.com/influxdb/influxdb/raft.(*Log).followerLoop()
      /home/ubuntu/.go_project/src/github.com/influxdb/influxdb/raft/log.go:892 +0x3a1
  github.com/influxdb/influxdb/raft.(*Log).stateLoop()
      /home/ubuntu/.go_project/src/github.com/influxdb/influxdb/raft/log.go:858 +0x16b

Previous write by goroutine 56:
  github.com/influxdb/influxdb/raft.(*IndexFSM).Apply()
      /home/ubuntu/.go_project/src/github.com/influxdb/influxdb/raft/internal_test.go:52 +0x48
  github.com/influxdb/influxdb/raft.(*Log).applyNextUnappliedEntry()
      /home/ubuntu/.go_project/src/github.com/influxdb/influxdb/raft/log.go:1448 +0x8ae
  github.com/influxdb/influxdb/raft.(*Log).applier()
      /home/ubuntu/.go_project/src/github.com/influxdb/influxdb/raft/log.go:1386 +0x18f

@benbjohnson
Copy link
Contributor Author

Fixed: d565076

@otoolep
Copy link
Contributor

otoolep commented Apr 15, 2015

Seems sensible, +1 on green build. Can you update the CHANGELOG too?

@benbjohnson
Copy link
Contributor Author

CHANGELOG added.

benbjohnson added a commit that referenced this pull request Apr 15, 2015
@benbjohnson benbjohnson merged commit 817c2e7 into master Apr 15, 2015
@benbjohnson benbjohnson deleted the cluster-listener branch April 15, 2015 17:58
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.

None yet

2 participants