Commit Graph

28 Commits (98c87f08ca13d4e628b1f3c1e5b64692d1613281)

Author SHA1 Message Date
Philip O'Toole 78592ac634 Prevent invalid database names
Close #843
2014-09-08 15:08:59 -04:00
John Shahid b9571f4ff3 Fix a merge conflict introduced earlier 2014-09-08 14:40:50 -04:00
Paul Dix 39091fc8fd Move cluster config from raft to API.
Fixes #853. Close #854. Previously, there was an unprotected endpoint in
raft to return the cluster config that would include user hashes. This
endpoint is useful for debugging purposes so I restructured it and moved
it to the API. It ensures the requesting user is a cluster admin.

Cluster config will now return all of the cluster state including
servers, CQs, shards, etc.
2014-09-08 14:31:56 -04:00
Paul Dix 6ddfba6e32 Add ability to update existing shard spaces.
This will help users recover from #886. It's dangerous functionality because it only changes the metadata. Will document and tell people to use with caution.
2014-09-08 14:18:32 -04:00
John Shahid 4e3361ad58 Add profiling endpoints to the http api 2014-09-03 15:10:43 -04:00
John Shahid 4383375fe8 Split the different engines in their own types 2014-09-03 15:10:43 -04:00
John Shahid ff11c5b55e Use GetQueryString() instead of accessing the internal field 2014-09-03 15:10:42 -04:00
John Shahid 483e254c29 Api should have it's own coordinator interface 2014-09-03 15:10:42 -04:00
John Shahid 9c811a1761 Some cleanup 2014-09-03 15:10:42 -04:00
John Shahid b66eab4f25 Remove some api endpoints that are redundant 2014-09-03 15:10:42 -04:00
John Shahid aeea03e362 Get rid of migration 2014-09-03 15:10:42 -04:00
John Shahid 1df438a732 Merge pull request #857 from oliveagle/more_informative_api_get_servers
GetLeaderRaftConnectString returns consistent result
2014-08-29 13:19:08 -04:00
Todd Persen fb9d03e28d Merge pull request #863 from influxdb/862-slow-data-migrator
Add optional pausing to data migration.
2014-08-21 17:27:53 -04:00
Todd Persen 73de8f18a6 Merge pull request #861 from influxdb/860-validte-shards
Update database configuration to validate shard spaces before making db
2014-08-21 17:27:41 -04:00
Paul Dix 439e4c9914 Add optional pausing to data migration. 2014-08-21 17:15:55 -04:00
Paul Dix 72274002fc Update database configuration to validate shard spaces before creating anything.
Fixes #860. Update the validate method on shard spaces to optionally check if the database exists.
2014-08-21 16:59:27 -04:00
oliveagle 9117ae789b GetLeaderRaftConnectString returns consistent result 2014-08-22 01:30:48 +08:00
oliveagle 8fdd988226 makes listServers api more informative 2014-08-19 17:09:23 +08:00
John Shahid d9f14cbb72 Merge pull request #832 from influxdb/831-create-shard-space
Make create shard space endpoint database specific.
2014-08-15 14:10:32 -04:00
John Shahid 45d1b793a7 Fix a compilation error in the test 2014-08-15 13:53:23 -04:00
Paul Dix 632dba81dc Make create shard space endpoint database specific.
Fixes #831. Shard spaces now belong to a database so the endpoint should reflect that.
2014-08-15 13:23:21 -04:00
Paul Dix 5403baffd3 Add data migration 0.7 -> 0.8
Close #809. Fix #746
2014-08-15 13:20:49 -04:00
John Shahid dd116bdca7 Don't read the entire body in memory 2014-08-01 16:09:09 -04:00
Paul Dix 97508402ee Move load database config to API
Fix #791 - Removed load database config options from the daemon. Created an API endpoint and updated test.
Fix #745 - Added definition of continuous queries to load database config.
Close #792
2014-08-01 16:09:00 -04:00
Dieter Plaetinck 856a94cc78 graphite ingest write data in batches to coordinator
Close #644

This commit also include lots of cleanup related to start up and
shutting down as well as logging. Below is an explanation of how the api
starts up and shuts down. It also covers the error conditions and how
they are handled.

networking/goroutine fixes

* break from TCP Accept() loop when connection closed, which was preventing shutdown to proceed
* make sure that UDP functionality doesn't write to writeSeries channel after it has been closed.
* clearer, more specific shutdown message

in particular:

 * self.writers allows us to make sure things writing to writeSeries are done
   (they do blocking calls to handleMessage()) whether udp or tcp
 * self.connClosed lets us break from the Accept() loop,
   see http://zhen.org/blog/graceful-shutdown-of-go-net-dot-listeners/ (quit channel)
 * shutdown channel is now allCommitted

things can get a little complicated, so here's a little schematic of how the functions and
their logic relate:
indent for a call out or important code within. everything shown as one nested tree

  server.go
      go ListenAndServe
          go committer
              reads from self.writeSeries until closed, then writes to self.allCommitted
          Serve
              for {
                  Accept, breaks if err + connClosed
                  self.writers.Add()
                  go handleClient
                      for {
                          handleMessage
                              reads until err and writes to self.writeSeries until read failed
                          reads until EOF, ignores other handleMessage errors
                      }
                      conn.Close()
                      self.writers.Done()
              }
              self.writers.Wait()
              close(self.writeSeries)
      Close()
          close(self.connClosed)
          self.conn.Close()
          wants confirmation on allCommitted channel; [timeout] returns within 5s
2014-07-28 14:40:21 -04:00
Shugo Maeda d74e71ca83 When a server is removed, its ID should be removed from shards. 2014-07-17 18:28:06 +09:00
John Shahid 39ea797dcd Fix #690. Use idiomatic go project structure
Conflicts:
	cluster/cluster_configuration.go
	cluster/shard.go
	coordinator/command.go
	coordinator/coordinator_test.go
	coordinator/raft_server.go
	daemon/influxd.go
	datastore/shard.go
	integration/single_server_test.go
	parser/query_spec.go
	server/server.go
2014-07-14 18:47:37 -04:00
John Shahid e5276112c1 Restructure the codebase to be more idiomatic 2014-06-30 11:31:08 -04:00