Commit Graph

131 Commits (a135906b430721918ed532c44a44da471cbcc60f)

Author SHA1 Message Date
Joe LeGasse c149906cbf Use r.URL.Query().Get() rather than r.FormValue()
FormValue() would attempt to parse the body of a request when the
content-type is set to `application/x-www-form-urlencoded`. The write
handler never wants url-encoded forms, and should only ever check the
URL for query parameters.

Fixes #6061
2016-03-30 17:16:10 -04:00
Jonathan A. Sternberg d2bc954236 Have an error overwrite previous results when aggregating results in the HTTP handler
It's possible for a single query to send multiple results that get
aggregated in the HTTP handler. If an earlier result passed in data and
a later result had an error, the error would be ignored.

Now an error for a statement will overwrite any previous results for
that statement.
2016-03-30 16:08:56 -04:00
Jonathan A. Sternberg 364dce36ab Support chunking in the middle of a series in the emitter
Limit the maximum size of the return value when chunking is not used to
prevent the server from going out of memory.

Fixes #6115.
2016-03-30 14:36:35 -04:00
Cory LaNou fa05ae038a fix inconsistent route names 2016-03-25 14:10:31 -05:00
Cory LaNou 2a7abbab1f more external routes magic 2016-03-24 13:03:11 -05:00
Cory LaNou b3b4a3764a allow routes to be added outside the httpd package 2016-03-24 13:03:11 -05:00
Jonathan A. Sternberg 9246816c66 Implement http.CloseNotifier interface for gzipResponseWriter
This seems to have been an oversight since all of the response writers
are supposed to implement this interface, but the gzipResponseWriter
didn't implement this interface for some reason.
2016-03-21 12:07:07 -04:00
Jonathan A. Sternberg 117f62c33e Implement a simple task manager for queries
The currently running queries can be listed with the command
`SHOW QUERIES` and it will display the current commands that have been
run, the database they were run against, and how long they have been
running.
2016-03-21 12:06:06 -04:00
gunnaraasen d96eef4c52 Remove deprecated JSON write path 2016-03-15 19:52:41 -07:00
Cory LaNou ba6a95e9bc Merge pull request #5994 from influxdata/single-server-lite
Single Server
2016-03-14 16:11:37 -05:00
Cory LaNou 1d2c1faa94 address PR feedback 2016-03-14 16:55:54 +00:00
Cory LaNou d024ca2552 modify WritePoints function signature for p products 2016-03-14 16:55:54 +00:00
Cory LaNou 27cfaa4b7a in memory meta, single node configs, etc. 2016-03-14 16:55:54 +00:00
Joe LeGasse 3f880c6f9c pre-allocate a buffer for HTTP writes 2016-03-14 11:32:50 -04:00
Jason Wilder 31a964e890 Move leases to meta.Data 2016-03-11 12:27:08 -07:00
Joe LeGasse 5d3f6e199a Keep connections alive when using Go 1.4.3
Go 1.4.3 was a security release that also created a strange edge-case
that caused connections to not be kept alive and reused when Close()
is called on the Body of the request. Close() hasn't been required on
the Body of a request for some time, so there is no harm is not calling
it anymore.
2016-03-02 13:02:41 -05:00
Mark Rushakoff b72c684afb Merge pull request #5681 from influxdata/mr-expand-stats
Add more stats for httpd, query executor
2016-02-18 14:11:09 -08:00
Jason Wilder b4490788a0 Merge pull request #5512 from influxdata/ga-remove-json-write
Remove JSON write path
2016-02-17 16:52:22 -07:00
Mark Rushakoff 759538da2a Add httpd stats for durations, num active requests 2016-02-17 15:38:55 -08:00
Ben Johnson e3b4b71c13 refactor query executor
This commit moves the `QueryExecutor` to the `cluster` package
and provides an interface to it inside the `influxql` package.
2016-02-17 15:13:56 -07:00
gunnaraasen a7a8258b3e Add config option to enable JSON write path 2016-02-16 16:29:25 -08:00
Todd Persen cb1b1859fe Fix conflicts and split out client/server version. 2016-02-10 22:30:19 -08:00
Ben Johnson 5a0d1ab7c1 rename influxdb/influxdb to influxdata/influxdb
This commit changes all the import and URL references from:

    github.com/influxdb/influxdb

to:

    github.com/influxdata/influxdb
2016-02-10 10:26:18 -07:00
Todd Persen 66e6375973 Move status request metrics to their own label 2016-01-26 18:10:02 -08:00
Todd Persen 06e91dfca1 Remove MetaClient.Ping from `/ping` and move it to `/status` 2016-01-26 17:58:44 -08:00
Paul Dix 7b71b66e31 Update meta service, meta client, and httpd handler
* Improve the ping endpoint so that it can optionally check for leader agreement across all meta servers
* Add Ping method to the meta client
* Fix ClusterID tests
* Remove WaitForLeader from meta client and remove unnecessary references to it
2016-01-21 15:28:33 -05:00
Paul Dix f385945058 Update Server to work with new metaservice/client 2016-01-21 15:28:33 -05:00
Cory LaNou 8d878fff91 buildable meta -> services/meta 2016-01-21 15:28:32 -05:00
Nathaniel Cook 8214676363 fix panic when merging empty series 2015-12-15 11:32:51 -07:00
Paul Dix 6e1d0f47d4 Merge pull request #4921 from pires/3170-db_not_found
Handler errors should be formatted as JSON.
2015-12-02 11:36:53 -05:00
Cory LaNou 3cd8056664 Merge pull request #4876 from e-dard/lint
Lint
2015-12-02 08:55:47 -06:00
Edd Robinson 8384ba3e84 Update comments. 2015-12-02 12:35:58 +00:00
Paulo Pires 4587a5387d Handler errors should be formatted as JSON. Fixes #3170 2015-11-27 21:12:05 +00:00
Cory LaNou be488b7d12 implement close notifier and timeout on executors 2015-11-24 21:07:18 -06:00
Edd Robinson ffbd6037e2 Initial lint for all packages under services. Supports #4098 2015-11-22 19:23:56 +00:00
Philip O'Toole 06cd9b1e4d Merge pull request #4411 from gobwas/master
Update handler.go
2015-11-18 16:12:18 -08:00
oiooj d9a60d7e4c fix write points panic 2015-10-30 10:52:50 -07:00
Philip O'Toole ef190b4013 Merge pull request #4600 from influxdb/wait_for_leader
ping endpoint can now wait for leader
2015-10-28 12:04:53 -07:00
Philip O'Toole 2046556b71 Ping endpoint supports waiting for leader 2015-10-28 11:37:07 -07:00
Jason Wilder 7d6d23e661 Write as many points as we can parse via line protocol
This changes the HTTP line protocol handler to behave similar to the other
handler in that they will write as many points as possible.  Previously, we
would fail the entire batch if one point failed.  This can happen more frequently
now with NaN being more explicitly unsupported.  Now it will write as many points
that parse successfully and return a "partial write" error to the client with the
lines that failed to parse.
2015-10-27 17:12:57 -06:00
Jason Wilder 0926b19e6b Prevent creating points with NaN float values
Float values are not supported in the existing engine and the tsm1
engines.  This changes NewPoint to return an error if a field value
contains a NaN field.  It also allows us to validate fields to prevent
other unsupported types from sneaking in through other input plugins.
2015-10-27 17:12:52 -06:00
David Norton e73a8e423c fix #4472:too many points in the GROUP BY interval 2015-10-16 07:17:14 -04:00
Sergey Kamardin d25e264009 Update handler.go
Add `Access-Control-Expose-Headers` for `ping` endpoint clients be able to retrieve `X-Influxdb-Version` and `Date` from the server.
2015-10-12 18:05:18 +03:00
Cory LaNou 72f6f7d268 Merge pull request #4134 from influxdb/issue-3447
Refactor Points and Rows to dedicated packages
2015-09-17 15:27:48 -05:00
Cory LaNou 38cb7b49de Mising defer in httpd recovery. fixes #4124 2015-09-17 09:37:27 -05:00
Cory LaNou d19a510ad2 refactor Points and Rows to dedicated packages 2015-09-16 15:33:08 -05:00
Alex Iribarren 22ea73d0c3 Figure out the InfluxDB version from /ping and show it on the admin page 2015-09-16 13:59:50 +00:00
Philip O'Toole 579e2a250c Add stats to httpd package 2015-09-04 12:37:59 -07:00
David Norton 66001cfbb5 fix #2555: add integration tests for CQs 2015-09-03 07:12:15 -04:00
Philip O'Toole 366c0115f9 Serve expvar information from HTTP package 2015-09-01 15:22:37 -07:00
Jon Seymour bdce79fe57 Merge branch 'secure-options-minimal' into secure-options 2015-08-19 09:15:58 +10:00
Jon Seymour 1d5ff55d76 Remove redaction logic from parseCredentials.
We now redact the credentials in the logger, so the function implemented
by the deleted lines now seems redudndant.

Signed-off-by: Jon Seymour <jon@wildducktheories.com>
2015-08-19 09:08:54 +10:00
Philip O'Toole 487c336571 Correctly merge rows for identical series
If no chunking was requested by the user, the co-ordinating node buffers all
results in RAM before emitting a single result. However buffering was not
merging results for rows which had data for the same series. This change fixes this.

Fixes issue #3242.
2015-08-17 13:43:17 -07:00
gunnaraasen 7dc7389e96 Remove dump from client and handler 2015-08-07 11:56:30 -07:00
gunnaraasen 5ef0be2d71 Respond to OPTIONS requests on /query endpoint 2015-07-27 11:58:44 -07:00
gunnaraasen 785a8b4d9a Sanitize password from HTTP logs 2015-07-21 18:28:05 -07:00
Philip O'Toole 425a65fca1 RemoteShard mapping now performed over TCP
With this change remote mapping no longer uses HTTP, as the HTTP ports
exposed by nodes on the cluster are not known cluster wide. The TCP
ports exposed by the cluster service are, so this change uses that
functionality. Each RemoteMapper has its own dedicated connection pool
for each node, and remote mapping TCP connections are in no way coupled
with query TCP connections.
2015-07-20 10:44:38 -07:00
Philip O'Toole f549910a18 Merge pull request #3279 from LK4D4/fix_style_else
Fix style issues with else
2015-07-17 11:53:42 -07:00
gunnaraasen 9ba37325f6 Fixes authorization.
Adds GRANT and REVOKE statements for admin privilege. Adds authorization to the query endpoint.
2015-07-17 11:33:06 -07:00
Alexander Morozov 675eacbf2c Fix style issues with else
In go it's better to just continue flow without "else", if it is return in
"if" statement.

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-07-17 11:10:23 -07:00
Philip O'Toole 65a580779b Shard mapping handler returns on errors 2015-07-15 16:08:10 -07:00
Philip O'Toole 7bdba556a1 Support pretty printing shard mapping 2015-07-15 13:06:16 -07:00
Philip O'Toole 74cb96646c Refactor query engine for distributed query support
With this change, the query engine code gathers information about
shards and tagsets by working with individual shards, collating the
information, and returning that to the client. It does not assume that any
particular shard is local, and accesses all shards through abstracted
Mappers, of which there are two types -- a Mapper type for Raw queries
and a second type for Aggregate queries. There are corresponding
Executors for each type of Mapper, but both types of Executors share the
same interface.
2015-07-15 12:54:55 -07:00
Joseph Crail 5fccee3d16 Fix spelling errors in comments and strings. 2015-06-28 02:54:34 -04:00
Vladimir Lopes 57e0879f84 Correct use of config write-tracing on the httpd handler 2015-06-17 09:55:34 -03:00
Paul Dix 5e7ddc6a60 Merge pull request #2928 from neonstalwart/version-header
pass along version to httpd/handler
2015-06-12 09:46:33 -04:00
Jason Wilder 884472ff8c Write a newline after writing error for line protocol
Errors generated via curl or CLI tools can be hard to read using
a shell.
2015-06-11 16:19:19 -06:00
ben hockey ce84047b44 pass along version to httpd/handler 2015-06-11 11:22:37 -05:00
Jason Wilder 48b98fea70 Skip leading whitespace when detecting JSON writes without content-type
Fixes #2834
2015-06-08 16:44:47 -06:00
David Norton fb514f2302 fix #2733: add endpoint to trigger CQ(s) 2015-06-05 19:56:28 -04:00
Jason Wilder c36cec70f2 Merge pull request #2748 from influxdb/jw-points-name
Ensure JSON point writes have names and at least 1 field
2015-06-02 20:50:16 -06:00
Jason Wilder 5c96b03e3b Preventing writing points with no measument name or fields
Causes the shard write to fail which ends up closing the shard and
future writes cause a panic.
2015-06-02 20:38:15 -06:00
Cory LaNou b3f215ac5f add back epoch conversion on query results 2015-06-02 14:49:05 -06:00
Ben Johnson 44d38cb430 Merge branch 'master' into alpha1 2015-06-02 10:40:52 -06:00
Cory LaNou d962283ae6 adding some integration tests 2015-06-01 16:04:20 -06:00
Cory LaNou 17bdf1c114 get both json/line protocol endpoints working 2015-06-01 12:35:57 -06:00
Cory LaNou 3597565955 reading and writing yo! 2015-06-01 11:59:58 -06:00
Jason Wilder badb2bf057 Use content negotiation for /write API
If content-type is "application/json", we'll process the request as
of old JSON write API.  Otherwise, we assume line protocol but check
the first byte in case a older client is still sending JSON without the
correct content-type header.
2015-06-01 11:15:46 -06:00
Ben Johnson bf823d9887 Integrating cmd/influxd/run. 2015-05-30 14:06:36 -06:00
Ben Johnson 8c8a55a737 Removed 'failed' from test suite. 2015-05-30 08:59:27 -06:00
Ben Johnson 4872e6db7c Move services to subpackage. 2015-05-30 08:20:12 -06:00