Merge pull request #8515 from influxdata/jw-subscriber

Append subscribers service after it's open
pull/8521/head
Jason Wilder 2017-06-21 12:32:52 -06:00 committed by GitHub
commit 5512c97dac
1 changed files with 2 additions and 1 deletions

View File

@ -177,7 +177,6 @@ func NewServer(c *Config, buildInfo *BuildInfo) (*Server, error) {
s.PointsWriter = coordinator.NewPointsWriter()
s.PointsWriter.WriteTimeout = time.Duration(c.Coordinator.WriteTimeout)
s.PointsWriter.TSDBStore = s.TSDBStore
s.PointsWriter.AddWriteSubscriber(s.Subscriber.Points())
// Initialize query executor.
s.QueryExecutor = influxql.NewQueryExecutor()
@ -422,6 +421,8 @@ func (s *Server) Open() error {
return fmt.Errorf("open points writer: %s", err)
}
s.PointsWriter.AddWriteSubscriber(s.Subscriber.Points())
for _, service := range s.Services {
if err := service.Open(); err != nil {
return fmt.Errorf("open service: %s", err)